贪吃蛇--C语言百行代码

#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<windows.h>
#include<time.h>
struct node
{
    int x,y;
}s[10000];
int len = 0,sok=1,easy=1;
char body[2] = "@",food[2] = "$",space[2] = " ";
char name[100];
void printfXy(short x,short y, char c[100])
{
    COORD pos = {
  x,y};
    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(hOut, pos);
    printf("%s",c);
}
void mainshow()
{
    char words1[20] = "请选择游戏模式:",words2[20] = "1、简单模式",words3[20] = "2、一般模式",
    words4[20] = "3、困难模式",words5[30]="请输入模式前对应编号:",words6[20]="贪吃蛇",
    tips[30]="游戏即将开始。。请稍后。。",user[20] = "请输入你的名字:";;
    printfXy(44,3,words6);
    printfXy(40,5,words1);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值