c语言小游戏
weixiaoyiri
这个作者很懒,什么都没留下…
展开
-
五子连珠
代码/* * 玩法:wsad方向,空格选择,q退出 */#include <stdlib.h> #include <signal.h> #include <sys/time.h> #include <curses.h>struct path_node { int row, col; int path; struct path_node *next; };struct m原创 2015-12-12 11:17:42 · 765 阅读 · 0 评论 -
棍子英雄
代码/* * play : press space to start and again to stop * note : please play it in full screen */#include <stdlib.h> #include <signal.h> #include <sys/time.h> #include <curses.h> #include <setjmp.h>#de原创 2015-12-12 11:33:51 · 891 阅读 · 0 评论 -
贪吃蛇
代码/* ************************************ * wsad控制上下左右,q退出,空格暂停 * 编译命令 gcc snake.c -lcurses * 需要下载ncurses库,具体方法请百度 ************************************* */ #include <unistd.h> #include <signal.h> #incl原创 2015-12-12 10:37:58 · 302 阅读 · 0 评论 -
俄罗斯方块
代码/* * 玩法:w变形,asd方向,空格暂停,q退出 */ #include <stdlib.h> #include <string.h> #include <signal.h> #include <sys/time.h> #include <curses.h>#define ROW_NUM 11 #define COLUMN_NUM 10 #def原创 2015-12-12 11:13:10 · 353 阅读 · 0 评论 -
五子棋
代码/* * 玩法:wsad方向,空格落子 */ #include <stdlib.h> #include <string.h> #include <curses.h> #include <signal.h> #include <sys/time.h>#define COMPUTER_FIRST 1 #define HUMAN_FIRST 2 #defi原创 2015-12-12 11:23:48 · 300 阅读 · 0 评论 -
扫雷
代码#include <stdlib.h> #include <string.h> #include <curses.h> #include <signal.h> #include <sys/time.h>#define ROW_SMALL 10 #define COL_SMALL 10 #define ROW_LARGE 20 #defi原创 2015-12-12 11:04:39 · 270 阅读 · 0 评论 -
2048
代码/* ************************************ * wsad控制上下左右,q退出 * 编译命令 gcc 2048.c -lcurses * 需要下载ncurses库,具体方法请百度 ************************************* */ #include <stdio.h> #include <curses.h> #include <sy原创 2015-12-12 10:55:51 · 376 阅读 · 0 评论 -
围住神经猫
代码/* * how to play: w->up, s->down, a->left, d->right, space->enter */#include <stdio.h> #include <stdlib.h> #include <curses.h> #include <string.h> #include <setjmp.h>#define CWAY 'O' #define CSTON原创 2015-12-12 11:30:51 · 533 阅读 · 0 评论 -
flappy bird
代码#include <curses.h> #include <stdlib.h> #include <signal.h> #include <sys/time.h>#define CHAR_BIRD 'O' #define CHAR_STONE '*' #define CHAR_BLANK ' 'typedef struct node { int x, y; struct node原创 2015-12-12 11:08:13 · 385 阅读 · 0 评论