55问答网
所有问题
当前搜索:
c语言贪吃蛇大作战代码
求
贪吃蛇
的程序
代码
(
c语言
)
答:
贪吃蛇
游戏的
代码
define N 200 include <graphics.h> include <stdlib.h> include <dos.h> define LEFT 0x4b00 define RIGHT 0x4d00 define DOWN 0x5000 define UP 0x4800 define ESC 0x011b int i,key;int score=0;/*得分*/ int gamespeed=50000;/*游戏速度自己调整*/ struct Food { i...
贪吃蛇c语言代码
答:
initgraph(&gd,&gm,"c:\\tc");cleardevice();} /*开始画面,左上角坐标为(50,40),右下角坐标为(610,460)的围墙*/ void DrawK(void){ /*setbkcolor(LIGHTGREEN);*/ setcolor(11);setlinestyle(SOLID_LINE,0,THICK_WIDTH);/*设置线型*/ for(i=50;i<=600;i+=10)/*画围墙*/ {...
贪吃蛇
游戏的
C语言代码
答:
initgraph(&gd,&gm,"c:\\tc");cleardevice();} /*开始画面,左上角坐标为(50,40),右下角坐标为(610,460)的围墙*/ void DrawK(void){ /*setbkcolor(LIGHTGREEN);*/ setcolor(11);setlinestyle(SOLID_LINE,0,THICK_WIDTH);/*设置线型*/ for(i=50;i<=600;i+=10)/*画围墙*/ {...
求,
贪吃蛇
C语言代码
及其每一步的讲解
答:
initgraph(&gd, &gm, "c:\\tc");cleardevice();} /*开始画面,左上角坐标为(50,40),右下角坐标为(610,460)的围墙*/ void DrawK(void){ /*setbkcolor(LIGHTGREEN);*/ setcolor(11);setlinestyle(SOLID_LINE, 0, THICK_WIDTH);/*设置线型*/ for(i = 50; i <= 600; i += 10)/*...
新手求
c语言贪吃蛇源代码
,一定要有注释,不要有光标移动函数之类的(新 ...
答:
initgraph(&gd,&gm,"c:\\tc");cleardevice();} /*开始画面,左上角坐标为(50,40),右下角坐标为(610,460)的围墙*/ void DrawK(void){ /*setbkcolor(LIGHTGREEN);*/ setcolor(11);setlinestyle(SOLID_LINE,0,THICK_WIDTH);/*设置线型*/ for(i=50;i<=600;i+=10)/*画围墙*/ {...
求
贪吃蛇C语言代码
答:
include <windows.h> include <stdlib.h> include include <stdio.h> include <string.h> include <conio.h> define N 21 int apple[3],num;char score[3];char tail[3];void gotoxy(int x, int y) //输出坐标 { COORD pos;pos.X = x;pos.Y = y;SetConsoleCursorPosition(Get...
c语言 贪吃蛇
程序
答:
printf(" ---
贪吃蛇
的移动---"); DrawBorder(); //自定义几个蛇的身体 AddBody(pos); pos.X += 2; AddBody(pos); pos.X += 2; AddBody(pos); pos.X += 2; AddBody(pos); pos.X += 2; AddBody(pos); pos.X += 2; AddBody(pos); pos.X += 2; AddBody(pos); //控制蛇的移...
用
c语言
编写的
贪食蛇
游戏
答:
这是一个成功的
贪吃蛇代码
(
c语言
编写的),希望你能看懂!慢慢看:define N 200 include <graphics.h> include <stdlib.h> include <dos.h> define LEFT 0x4b00 define RIGHT 0x4d00 define DOWN 0x5000 define UP 0x4800 define ESC 0x011b int i,key;int score=0;/*得分*/ int game...
c语言 贪吃蛇
程序
答:
include <stdio.h> include <conio.h> include <windows.h> define BEG_X2 define BEG_Y1 define WID20 define HEI20 HANDLE hout;typedef enum {UP, DOWN, LEFT, RIGHT} DIR;typedef struct Snake_body { COORD pos;//蛇身的位置 struct Snake_body *next;//下一个蛇身 struct Snake_body ...
贪吃蛇
怎么用
C语言
编写
答:
include <stdio.h> include <graphics.h> include <stdlib.h> include <dos.h> /*引用的库函数*/ define LEFT 0x4b00 define RIGHT 0x4d00 define DOWN 0x5000 define UP 0x4800 define ESC 0x011b/*宏定义键名*/ define N 200 int i,key;int level;/*游戏等级*/ int score=0;/*得分...
<涓婁竴椤
1
2
3
4
5
6
7
8
9
10
涓嬩竴椤
灏鹃〉
其他人还搜