半成品(请勿游玩)(||vv||)

wyh15 Minecraft 2024-02-03 16:04:41 10

#include<bits/stdc++.h>

using namespace std;

void kaishi(){

printf("抵制不良游戏,");

_sleep(1000);

printf("拒绝盗版游戏。 ");

_sleep(1000);

printf("注意自我保护,");

_sleep(1000);

printf("谨防受骗上当。 ");

_sleep(1000);

printf("适度游戏益脑,");

_sleep(1000);

printf("沉迷游戏伤身。 ");

_sleep(1000);

printf("合理安排时间,");

_sleep(1000);

printf("享受健康生活。");

}

void move(){

int dx = 0, dy = 0;

if(dir == 'u') dy = -1;

else if(dir == 'd') dy = 1;

else if(dir == 'l') dx = -1;

else if(dir == 'r') dx = 1;

setPos(snakes[len-1].x*2,snakes[len-1].y);

printf("  ");

for(int i=len-1;i>=1;i--){

	snakes[i].x = snakes[i-1].x;

	snakes[i].y = snakes[i-1].y;

}

snakes[0].x = snakes[0].x + dx;

snakes[0].y = snakes[0].y + dy;	

}

void keyDown(){

char key;

while(kbhit()) key = _getch();  

switch(key){

	case 'W':

	case 'w':

	case 72:

		if(dir != 'd') dir = 'u';

		break;

	case 'S':

	case 's':

	case 80:

		if(dir != 'u') dir = 'd';

		break;

	case 'A':

	case 'a':

	case 75:

		if(dir != 'r') dir = 'l';

		break;

	case 'D':

	case 'd':

	case 77:

		if(dir != 'l') dir = 'r';

		break;

	case 'E':

	case 'e':

		FPS -= 20;

		break;

	case 'Q':

	case 'q':

		FPS += 20;

		break;

} 

}

int main(){

kaishi();

return 0;

}

{{ vote && vote.total.up }}