//CZ原创专属水印
#include <bits/stdc++.h>
using namespace std;
long long temp=0,temp2=0,VIP=0;
long long a[1005][1005],x=6,y=6;
long long money=50,life=100,level=1,energy=20,guai=100,xiang=100;
void jinru(){
	a[x][y]=1;
	cout<<endl;
	cout<<"===================";
	cout<<endl;
	cout<<a[x-2][y-2];
	cout<<a[x-1][y-2];
	cout<<a[x][y-2];
	cout<<a[x+1][y-2];
	cout<<a[x+2][y-2];
	cout<<endl;
	cout<<a[x-2][y-1];
	cout<<a[x-1][y-1];
	cout<<a[x][y-1];
	cout<<a[x+1][y-1];
	cout<<a[x+2][y-1];
	cout<<endl;
	cout<<a[x-2][y];
	cout<<a[x-1][y];
	cout<<a[x][y];
	cout<<a[x+1][y];
	cout<<a[x+2][y];
	cout<<endl;
	cout<<a[x-2][y+1];
	cout<<a[x-1][y+1];
	cout<<a[x][y+1];
	cout<<a[x+1][y+1];
	cout<<a[x+2][y+1];
	cout<<endl;
	cout<<a[x-2][y+2];
	cout<<a[x-1][y+2];
	cout<<a[x][y+2];
	cout<<a[x+1][y+2];
	cout<<a[x+2][y+2];
	cout<<endl;
	cout<<"===================";
	cout<<endl;
	if(VIP==888){
		cout<<"作者模式专属查看权限:";
		cout<<endl; 
		cout<<"剩余怪物数量:"<<guai;
		cout<<endl;
		cout<<"剩余奖励箱:"<<xiang;
		cout<<endl;
		if(x<503 && y<503) cout<<"您在左下角";
		if(x>503 && y<503) cout<<"您在右下角";
		if(x<503 && y>503) cout<<"您在左上角";
		if(x>503 && y>503) cout<<"您在右上角";
		cout<<endl;
		cout<<"专属查看权限线=============================================";
		cout<<endl; 
	}
	
	cout<<endl;
	cout<<"您的坐标是("<<x<<","<<y<<")";
	cout<<endl; 
	cout<<"您的energy是";
	cout<<energy;
	cout<<endl; 
}
void yidong(){
	cout<<endl;
	cout<<"1.上;2.下;3.右;4.左;5.查看状态";
	cout<<endl;
	temp=0;
	while(temp!=1 && temp!=2 && temp!=3 && temp!=4 && temp!=5){
		cin>>temp;
	} 
	if(temp==1){
		if(x+1<1005){
			temp=0;
			a[x][y]=0;
			x++;
			cout<<endl;
		}
		else{
			cout<<endl;
			cout<<"移动失败,这里是世界的边界。";
			cout<<endl;
		}
	} 
	if(temp==2){
		if(x-1>1){
			temp=0;
			a[x][y]=0;
			x--;
			cout<<endl;
		}
		else{
			cout<<endl;
			cout<<"移动失败,这里是世界的边界。";
			cout<<endl;
		}
	}
	if(temp==3){
		if(y+1<1005){
			temp=0;
			a[x][y]=0;
			y++;
			cout<<endl;
		}
		else{
			cout<<endl;
			cout<<"移动失败,这里是世界的边界。";
			cout<<endl;
		}
	}
	if(temp==4){
		if(y-1>1){
			temp=0;
			a[x][y]=0;
			y--;
			cout<<endl;
		}
		else{
			cout<<endl;
			cout<<"移动失败,这里是世界的边界。";
			cout<<endl;
		}
	}
	if(temp==5){
		cout<<endl;
		cout<<"您的money是";
		cout<<money;
		cout<<endl;
		cout<<"您的life是";
		cout<<life;
		cout<<endl;
		cout<<"您的level是";
		cout<<level;
		cout<<endl;
		cout<<"您的energy是";
		cout<<energy;
		cout<<endl; 
	}
}
void yixian(){
	for(int i=1;i<=energy;i+=0){
		jinru();
		yidong();
		energy-=1;
		if(VIP==888){
			energy++;
		} 
	}
	cout<<endl;
	cout<<"您没有energy了。";
	cout<<endl;
	cout<<"是否使用5 life 兑换 1 energy?(1.是;2.否)";
	cout<<endl;
	temp2=0;
	cin>>temp2;
	if(temp2==1){
		if(life > 5){
			cout<<endl;
			cout<<"兑换成功。(SG)";
			life-=5;
			cout<<endl;
			energy++;
			yixian();
		}
		else {
			cout<<endl;
			cout<<"兑换失败。(FG)";
			cout<<endl; 
			cout<<"欢迎下次再战!";
			cout<<endl;
			return ;
		}
		
	}
}
void kaishi(){
	if(VIP==1){
		money=1e9;
		life=1e9;
		level=888;
		energy=1e9;
		cout<<"贵宾欢迎";
		cout<<endl;
		cout<<"orz";
		cout<<endl;
	}
	else if(VIP==888){
		money=1e9;
		life=1e9;
		level=888;
		energy=1e9;
		cout<<endl;
		cout<<"作者大大,欢迎";
		cout<<endl;
		cout<<"orz";
		cout<<endl;
		cout<<"~^m^~";
		cout<<endl;
		
	}
	else{
		cout<<"旅行者欢迎";
		cout<<endl;
	}
	yixian();
}
void zhuye(){
	temp=0;
	cout<<endl;
	cout<<"                CZ迷宫";
	cout<<endl;
	cout<<"//CZ原创//欢迎来到CZ迷宫";
	cout<<endl;
	cout<<"开始按1,说明按2";
	cout<<endl;
	while(temp!=1 && temp!=2){
		cin>>temp;
	}
	if(temp==1){
		cout<<endl;
		cout<<"开始";
		cout<<endl; 
		cout<<endl; 
		cout<<endl; 
		kaishi();
	}
	else if(temp==2){
		temp=0;
		cout<<endl;
		cout<<"             说明";
		cout<<endl;
		cout<<"查看版本按1,查看创作背景按2,查看故事背景请按3,输入礼包码按4";
		cout<<endl;
		while(temp!=1 && temp!=2 && temp!=3 && temp!=4){
			cin>>temp;
		}
		if(temp==1){
			temp=0;
			cout<<"1.0.0";
			zhuye();
		}
		else if(temp==2){
			temp=0;
			cout<<"CZ太懒了,什么都没写......";
			zhuye();
		}
		else if(temp==3){
			temp=0;
			cout<<"你是一名穿越到异世界的旅行者,好好探索,生存下去!";
			zhuye();
		}
		else if(temp==4){
			temp=0;
			cout<<"请输入礼包码";
			cin>>temp;
			if(temp==20130429){
				temp=0;
				cout<<endl;
				cout<<"礼包码正确,恭喜您成为CZ ·VIP。";
				VIP=1;
				zhuye();
			}
			else if(temp==35012420130429){
				temp=0;
				cout<<endl;
				cout<<"礼包码正确,作者大人CZ先生,欢迎您。";
				VIP=888;
				zhuye();
			}
			else if(VIP==888){
				cout<<endl;
				cout<<"作者大大,不要顽皮哦......";
				cout<<endl;
				zhuye(); 
			}
			else if(VIP==1 ){
				temp=0;
				cout<<endl;
				cout<<"您已经是CZ ·VIP了。";
				cout<<endl;
				zhuye();
			}
			else{
				temp=0;
				cout<<endl;
				cout<<"礼包码错误,您未成为CZ ·VIP。";
				cout<<endl;
				zhuye();
			}
		}
	}
}
int main(){
	zhuye();
	return 0;
}