落地成盒–贪吃蛇
▇█▇▇▇█▇
我也不知道我为什么要加个落地成盒还有那个盒子
算了,上代码 ☟☟☟(上面的资源不要积分哟)
>求关注,求点赞,求评论<
Thanks♪(・ω・)ノ
#include<stdio.h> #include<conio.h> #include<windows.h> #include<time.h> #define framex 5 #define framey 5 #define wide 20 #define high 20 int i,j,a[2]; void gotoxy(HANDLE hout,int x,int y) {COORD pos; pos.X=x; pos.Y=y; SetConsoleCursorPosition(hout,pos); } void cover (HANDLE hout) { gotoxy(hout,framex+wide,framey); printf("欢迎使用贪吃蛇游戏1.2"); gotoxy(hout,framex+wide,framey+5); printf("开始游戏前请关闭中文输入法"); gotoxy(hout,framex+wide*2,framey+20); printf( "游戏制作者:<bits/stdc++.h>"); gotoxy(hout,framex+wide*2,framey+22); printf("制作时间:2020年2月5日"); char a; a=getchar(); system("cls"); } struct Snake { int x[100]; int y[100]; int speed; int length; int count; }; struct Food { int x; int y; }; void makeframe(struct Snake snake) {HANDLE hout=GetStdHandle(STD_OUTPUT_HANDLE); gotoxy(hout,framex+wide*2+5,framey); printf( " 贪吃蛇游戏"); gotoxy(hout,framex+wide*2+5,framey+3); printf("使用方向键或wasd移动"); gotoxy(hout,framex+wide*2+5,framey+5); printf("长按方向键可加速"); gotoxy(hout,framex+wide*2+5,framey+7); printf("按任意键暂停,方向键继续"); for(i=0;i<wide*2+1;i++){ gotoxy(hout,framex+i,framey); printf("*"); } for(i=0;i
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364