c语言飞机大战源代码.docxVIP

  • 14
  • 0
  • 约1.66千字
  • 约 4页
  • 2020-06-30 发布于天津
  • 举报
。 。 PAGE # #includestdio.h #includeconio.h #includestdlib.h #includetime.h #define N 35 void print(int [][N]);// 输出 void movebul(int [][N]);// 子弹移动 void movepla(int [][N]);// 敌机移动 void setting();// 设置 void menu();// 菜单 int scr[22][N]={0},pl=9,width=24,speed=3,density=30,score=0,death=0;// 宽度,速度,密度, 分数, 死亡 main() { menu(); int i=0,j=0,c; scr[21][pl]=1; scr[0][5]=3; while(1) // 控制阶段 ( 开始) {if(kbhit())switch(getch()) {case a: case A: if(pl0) scr[21][pl]=0,scr[21][--pl]=1;break; case d: case D: if(plwidth-2)scr[21][pl]=0,scr[21][++pl]=1;break; case w: case W: scr[20][pl]=2;break; case 27: setting

文档评论(0)

1亿VIP精品文档

相关文档