diff --git a/extensions/game/game.c b/extensions/game/game.c index ab458df..4188f1f 100644 --- a/extensions/game/game.c +++ b/extensions/game/game.c @@ -11,11 +11,15 @@ #include "shell_cmd_group.h" extern int main_2048(int argc, char *argv[]); +extern int main_pushbox(int argc, char* argv[]); + ShellCommand gameGroup[] = { SHELL_CMD_GROUP_ITEM(SHELL_TYPE_CMD_MAIN, 2048, main_2048, game 2048\n2048 [param]\nParam: blackwhite bluered or null), + SHELL_CMD_GROUP_ITEM(SHELL_TYPE_CMD_MAIN, + pushbox, main_pushbox, game pushbox), SHELL_CMD_GROUP_END() }; SHELL_EXPORT_CMD_GROUP(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), game, gameGroup, games); diff --git a/extensions/game/pushbox/pushbox.c b/extensions/game/pushbox/pushbox.c index b8ceeda..661e5ca 100644 --- a/extensions/game/pushbox/pushbox.c +++ b/extensions/game/pushbox/pushbox.c @@ -5,8 +5,6 @@ #include #include #include -#include -#include #define printf(...) shellPrint(shellPushbox, ##__VA_ARGS__) @@ -91,6 +89,7 @@ void pushbox_print_map() } printf( "\r\n"); } + printf("w,a,s,d or q\n"); } //推箱子 @@ -182,6 +181,3 @@ int main_pushbox(int argc, char* argv[]) printf( "\033[?25l\033[2J"); return EXIT_SUCCESS; } -SHELL_EXPORT_CMD( - SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_DISABLE_RETURN, - pushbox, main_pushbox, game pushbox); \ No newline at end of file