lzth.net
当前位置:首页 >> C语言写贪吃蛇 >>

C语言写贪吃蛇

#include /*引用的库函数*/#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;/*得分*/ int gamespeed;/*游戏速度*/

TC 贪吃蛇代码2008-06-08 13:50#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 0x011bint i,key;int score=0;int

#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

#definen200 #include #include #include #defineleft0x4b00 #defineright0x4d00 #definedown0x5000 #defineup0x4800 #defineesc0x011b inti,key; intscore=0;/*得分*/ intgamespeed=50000;/*游戏速度自己调整*/ structfood { intx;/*食物的横坐标

.百度下 很多的..TC 贪吃蛇代码2008-06-08 13:50#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 0x011bint i,key;int

这是一个成功的贪吃蛇代码(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

原发布者:西瓜萝卜饭lala#include#include#include#include#include#include#include#defineN21 charapple[2]; chartail[2]; char**snake=NULL; intscore=0; intlen=3; charmax=0; voidgotoxy(intx,inty)//输出坐标 { COORDpos; pos.X=x; pos.Y=y;

慢慢看吧 然后修改程序. #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

先写个#include <stdio.h>int main(void){ return 0;}然后考虑接下来该怎么填这个空你的控制:左右上下状态:整条蛇的全体所占坐标排成一个向量,蛇当前方向矩形坐标范围障碍坐标死亡条件:当蛇头超过矩形坐标范围或者撞击障碍、蛇身加长

#include<conio.h>#include<graphics.h>#include<time.h>#include<string.h>#include<malloc.h>#include<stdio.h>int grade=5,point=0,life=3;void set(),menu(),move_head(),move_body(),move(),init_insect(),left(),upon(),right(),down(),init_graph(),food

网站首页 | 网站地图
All rights reserved Powered by www.lzth.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com