跪求c语言贪吃蛇代码,运行环境:vc++6.0 或者code blocks,以前在网站...答:include<conio.h> typedef struct snake { int a;int b;struct snake *u;struct snake *n;}snake,*snake1;typedef struct food { int a;int b;}food;void main(){ char c,c0 = 'd';int i,j,k,n=1,t,at;snake p,q;snake *dd,*dd0,*dd1,*dd2;food f;srand(time(NULL));...
能在dev-c++上运行通过的扫雷,贪吃蛇,等小游戏的c语言代码答:initgraph(&gd,&gm,"c:\\tc");cleardevice();} void DrawK(void){ setcolor(11);setlinestyle(SOLID_LINE,0,THICK_WIDTH);for(i=50;i<=600;i+=10){ rectangle(i,40,i+10,49); /*画出上边框*/ rectangle(i,451,i+10,460); /*画出下边框*/ } for(i=40;i<=450;i+=10)...
如何用C语言写贪吃蛇答:grade=5,point=0,life=3; void set(),menu(),move_head(),move_body(),move(),init_insect(),left(),upon(),right(),down(),init_graph(),food_f(),ahead(),crate(); struct bug { int x; int y; struct bug *last; struct bug *next; }; struct fd { int x; int y;...