C语言编写的推箱子游戏源码

时间:2013-06-17 15:56:20
【文件属性】:
文件名称:C语言编写的推箱子游戏源码
文件大小:22KB
文件格式:TXT
更新时间:2013-06-17 15:56:20
C语言 推箱子 游戏源码 #include #include #include #include #include #include #include #include #include #include #define MAX 3 #define STEPMAX 3 #define Key_R 0x1372 #define Key_Up 0x4800 #define Key_Enter 0x1c0d #define Key_Down 0x5000 #define Key_P 0x1970 #define Key_Esc 0x11b #define Key_Right 0x4d00 #define Key_Left 0x4b00 #define BKCOLOR GREEN #define STARTX 40 #define STARTY 80 int ghose[10][10]; int BOXNUM; int MISSIONNUM; int Key; int STEPNUM; int DIRECTIONKEY; int BOXMOVE[STEPMAX]; int STEP[STEPMAX]; typedef struct CURRENT { int x; int y; }PLAYER; PLAYER p; typedef struct ADD { int x; int y; }ADD; typedef struct STAR { int x; int y; int c; } STAR; STAR s[300]; DRAWSTAR1() {int i,j,m,n,dotx,doty,color,maxcolor; m=getmaxx(); n=getmaxy(); maxcolor=getmaxcolor(); for(i=0;i<300;i++) { s[i].x=random(m+1); s[i].y=random(n+1); s[i].c=random(maxcolor); putpixel(s[i].x,s[i].y,s[i].c);}} DRAWSTAR()

网友评论

  • 里面使用到的头文件有的没有哦。不过还是很感谢分享思路~
  • 不错,编译通过,期末课程设计用
  • 我是新手~ 对我来说有点难~