摘要:
学完数组的概念后,有一个简单的小游戏特别适合上手 生命游戏,假设有int Cells[30][30],也即有30×30个小格子,每个小格子里面可以有细胞生命,或者细胞死亡。通过把这些状态输出出来,就可以显示出相应的图案。生命游戏演化的规则: 每个矩阵方格可以包含一个有机体,不在边上的有机体有8个相邻 阅读全文
posted @ 2018-01-23 21:26
LeoSirius
阅读(190)
评论(0)
推荐(0)
摘要:
#include #include #include #include int high, width; //游戏画面大小 int bird_x, bird_y; //小鸟的坐标 int bar1_y, bar1_xDown, bar1_xTop; //障碍物 int score; //得分,经过障碍物的个数 void gotoxy(int x, int y... 阅读全文
posted @ 2018-01-23 18:29
LeoSirius
阅读(156)
评论(0)
推荐(0)
摘要:
#include #include #include #include int position_x, position_y; //飞机位置 int bullet_x, bullet_y; //子弹位置 int enemy_x, enemy_y; //敌机位置 int high, width; //游戏画面尺寸 int score; ... 阅读全文
posted @ 2018-01-23 15:02
LeoSirius
阅读(172)
评论(0)
推荐(0)
浙公网安备 33010602011771号