先看看效果吧
大一的时候做的,当时没有好的代码习惯,所以代码有点乱,代码直接复制就能用了,功能可以自行拓展
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main () {
int life=6;//生命
int i,j/*循环*/,plane_x,plane_y/*飞机所在坐标*/,a;
plane_x=8,plane_y=15;//初始化飞机
char getc; //方向获取
/*构造地图*/
int score=0; //得分 // 1 1 1 1 1 1 1
char Map[17][17]= { //0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},//0
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},//1
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},//2
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},//3
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},//4
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},//5
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},//6
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},//7
{1,