• 大小: 7.94KB
    文件类型: .cpp
    金币: 1
    下载: 0 次
    发布日期: 2021-01-29
  • 语言: C/C++
  • 标签: c++  贪吃蛇  

资源简介

没别的

资源截图

代码片段和文件信息

#include
#include
#include
#include
#define framex 5
#define framey 5
#define wide 20
#define high 20
int ija[2];
//将光标移动到指定位置 
void gotoxy(HANDLE houtint xint y)
{
    //COORD是WindowsAPI中定义的一种结构,表示一个字符在控制台屏幕上的坐标
    COORD pos;
    pos.X=x;
    pos.Y=y;
    //SetConsoleCursorPosition是API中定位光标位置的函数。
    SetConsoleCursorPosition(houtpos);
}
//游戏封面
void cover (HANDLE hout)
{
    gotoxy(houtframex+wideframey);
    printf(“欢迎使用贪吃蛇游戏*新年*版本“);
    gotoxy(houtframex+wideframey+5);
    printf(“本游戏已授权  未经允许 禁止转载!!!“);
    gotoxy(houtframex+wide*2framey+10);
    printf( “游戏制作者:朱彦霖“); 
    gotoxy(houtframex+wide*2framey+12);
    printf(“制作时间:2019年1月“); 
    char a;
    a=getchar();
    system(“cls“);

//定义蛇的结构体 
str

评论

共有 条评论