0.0分

1 人评分

  评论区

default: break;
	}
	charge();
}
void charge()
{
	Sleep(500);
	switch(snake_fx)
	{
	case 1:snake_hair_x++;break;
	case 2:snake_hair_x--;break;
	case 3:snake_hair_y--;break;
	case 4:snake_hair_y++;break;
	default:break;
	}

}
int main()
{
	while(1)
	{
		get_char();
	}


}
2021-10-29 15:37:24
#include<stdio.h>
#include<stdlib.h>
#include<windows.h>
#include<conio.h>
#include<dos.h>
char snake_fx=NULL;
char snake_body[20][20][400];
char snake_hair_y,snake_hair_x;
void charge();
void get_char();
void get_char()
{
	char key;
	key=_getch();
	switch(key)
	{
		case 'w':snake_fx=1;break;
	    case 's':snake_fx=2;break;
		case 'a':snake_fx=3;break;
		case 'd':snake_fx=4;break;
		default: break;
	}
	charge();
}
void charge()
{
	Sleep(500);
	switch(snake_fx)
	{
	case 1:snake_hair_x++;break;
	case 2:snake_hair_x--;break;
	case 3:snake_hair_y--;break;
	case 4:snake_hair_y++;break;
2021-10-29 15:37:13
while(1)
	{
		key=NULL;
		key=getchar();
		if(key=='w'&&(weizhi_y-1)==0&&weizhi_y-1>=0)
			weizhi_y--;
		else
			if(key=='s'&&(weizhi_y+1)==0&&weizhi_y+1<=10)
				weizhi_y--;
			else
				if(key=='a'&&(weizhi_x-1)==0&&weizhi_y-1>=0)
					weizhi_y--;
				else
					if(key=='d'&&(weizhi_x+1)==0&&weizhi_y-1<=10)
						weizhi_y--;
					else
						if(key==NULL)
							printf("error,please return \n");

	
	
	
	
	}
}
2021-10-22 15:36:42
#include<stdio.h>
int map[10][10]={1,1,1,1,1,1,1,1,1,1,
				  0,0,0,1,0,0,0,1,0,1,
				  1,1,0,1,0,0,0,1,0,1,
				  1,0,0,0,0,1,1,0,0,1,
				  1,0,1,1,1,0,0,0,0,1,
				  1,0,0,0,1,0,0,0,0,1,
				  1,0,1,0,0,0,1,0,0,1,
				  1,0,1,1,1,0,1,1,0,1,
				  1,1,0,0,0,0,0,0,0,0,
				  1,1,1,1,1,1,1,1,1,1};
int main()
{
	int enter_x,enter_y;
	int exit_x,exit_y;
	int weizhi_x,weizhi_y;
	char key;
	printf("please input enter_(x,y) and exit_(x,y) : \n");
	scanf("(%d,%d) (%d,%d)",&enter_x,&enter_y,&exit_x,&exit_y);
	while(1)
	{
		key=NULL;
		key=getchar();
		if(key=='w'&&(weizhi_y-1)==0&&weizhi_y-1>=0)
2021-10-22 15:36:06
#include<stdio.h>
int math[10][10]={1,1,1,1,1,1,1,1,1,1,
				  0,0,0,1,0,0,0,1,0,1,
				  1,1,0,1,0,0,0,1,0,1,
				  1,0,0,0,0,1,1,0,0,1,
				  1,0,1,1,1,0,0,0,0,1,
				  1,0,0,0,1,0,0,0,0,1,
				  1,0,1,0,0,0,1,0,0,1,
				  1,0,1,1,1,0,1,1,0,1,
				  1,1,0,0,0,0,0,0,0,0,
				  1,1,1,1,1,1,1,1,1,1};
int main()
{
	scanf("",&);
	while(1)
	{
	
	
	
	
	
	}
}
2021-10-20 20:37:55
  • «
  • 1
  • »