C语言写“贪吃蛇”

小微 科技C语言写“贪吃蛇”已关闭评论108字数 1734阅读模式
摘要vs实现的代码效果(扣1送C语言编译器和书本资料)先展示附源码includeinclude39;w&39;w&39;W&39;s&39;S&...

vs实现的代码效果(扣1送C语言编译器以及书本资料)

先展现文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

附源码文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

include<stdlib.h>文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

include<time.h>文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

39;w&39;w&39;W&39;s&39;S&39;a&39;A&39;d&39;D&34;);文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

getchar;文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

respect;文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

break;文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

}文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

}文章源自微观生活(93wg.com)微观生活-https://93wg.com/2438.html

}

int menuselect

{

char number;

int a;

printf;

printf;

printf;

printf;

printf;

printf;

while

{

number = getchar;

a = number - 48;

if

return a;

printf;

}

}

void goodbye

{

system;

SetConsoleTextAttribute, FOREGROUND_INTENSITY | FOREGROUND_RED);//设置红色

gotoxy;

printf;

getchar;

getchar;

}

void respect

{

system;

gotoxy;

printf;

Sleep;

printf;

Sleep;

printf;

Sleep;

printf;

printf;

Sleep;

getchar;

}

void introduce

{

system;

gotoxy;

printf;

printf;

printf;

printf;

printf;

printf;

getchar;

getchar;

}

void edition

{

system;

gotoxy;

printf;

printf;

printf;

printf;

printf;

printf;

printf;

printf;

printf;

getchar;

getchar;

}

int setup

{

//system; //第一个为背风景,第二个为字体色彩

/*0 = 黑色 8 = 灰色

1 = 蓝色 9 = 淡蓝色

2 = 绿色 A = 淡绿色

3 = 湖蓝色 B = 淡浅绿色

4 = 红色 C = 淡红色

5 = 紫色 D = 淡紫色

6 = 黄色 E = 淡黄色

7 = 白色 F = 亮白色*/

char s;

int a;

system;

printf;

printf;

printf;

printf;

printf;

printf;

while

{

s = getchar;

a = s - 48;

if

return a;

printf;

}

}

int setup1

{

switch )

{

case 1:

diffculty;

break;

case 2:

customize1;

break;

default:

break;

}

return 0;

}

int modifydiffculty

{

char s;

int a;

system;

printf;

printf;

printf;

printf;

printf;

while

{

s = getchar;

a = s - 48;

if

return a;

printf;

}

}

void diffculty

{

switch )

{

case 1:

len = 4;

speed = 500;

snakesize = 10;

system;

gotoxy;

printf;

printf;

system;

break;

case 2:

len = 4;

speed = 300;

snakesize = 25;

system;

gotoxy;

printf;

printf;

system;

break;

case 3:

len = 4;

speed = 70;

snakesize = 50;

system;

gotoxy;

printf;

printf;

system;

break;

case 4:

len = 4;

speed = 25;

snakesize = 70;

system;

gotoxy;

printf;

printf;

system;

break;

default:

break;

}

}

int customize

{

char s;

int a;

system;

printf;

printf;

printf;

while

{

s = getchar;

a = s - 48;

if

return a;

printf;

}

}

void customize1

{

int s;

switch )

{

case 1://自定义速度

system;

gotoxy;

printf");

scanf_s;

speed = ;

break;

case 2:

system;

gotoxy;

printf;

scanf_s;

len = s;

break;

default:

break;

}

}

评论送编程学习资料![呲牙][呲牙][呲牙]

以上就是微观生活(93wg.com)关于“C语言写“贪吃蛇””的详细内容,希望对大家有所帮助!

继续阅读
 
小微
  • 版权声明: 本文部分文字与图片资源来自于网络,转载此文是出于传递更多信息之目的,若有来源标注错误或侵犯了您的合法权益,请立即通知我们(管理员邮箱:81118366@qq.com),情况属实,我们会第一时间予以删除,并同时向您表示歉意,谢谢!
  • 转载请务必保留本文链接:https://93wg.com/2438.html