基本信息
源码名称:贪吃蛇
源码大小:2.31KB
文件格式:.c
开发语言:C/C++
更新时间:2021-12-17
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍
贪吃蛇

int main()
{
int a=1;
int b,c;
srand((unsigned)time(NULL));
printf("请用 w 控制方向\n    asd\n");
printf("请输入速度等级,1-5,数值越大速度越快,其中,第五档速度快慢取决");
printf("于您的cpu性能。\n注意!因为是系统全速运行,所以因cpu实时占用");
printf("不同,速度并非恒定值!\n请键入速度值(速度=50*(5-速度值)ms):"); 
scanf("%d",&b);
c=(50*(5-b));
printf("\n您准备好了么?");
getch(); 
f=(struct body *)malloc(sizeof(struct body));
f->x=10;
f->y=10;
f->p=NULL;
food.p=NULL;
food.x=rand()%20;
food.y=rand()%20;
panduan(food.x,food.y,f);
while(a)
{
Sleep(c);
system("cls");
show(f);
a=concer(f);
}
printf("您的成绩为%d",bodylong);
return bodylong;