資源簡介
沒別的
代碼片段和文件信息
#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
評論
共有 條評論