#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
long long win=0,ok=0,temp=0,room=1,w[1005];//w1钢笔 w2红肉面包 w3血水汤粉
//room 1操场
void start(int start){
cout<<"你穿越到了一个怪谈世界,加油,活下去"<<endl;
Sleep(3000);
system("cls");
}
int main(){
// freopen("in","r",stdin);
// freopen(".out","w",stdout);
start(1);
while(ok==0){
system("cls");
cout<<"搜索当前房间:1,移动:2,使用:3";
cout<<endl;
cout<<"当前房间:";
if(room==1){
cout<<"操场"<<endl;
}
if(room==2){
cout<<"教室"<<endl;
}
if(room==3){
cout<<"食堂"<<endl;
}
temp=0;
while(temp!=1 && temp!=2 && temp!=3){
cin>>temp;
}
if(temp==1){
temp=0;
if(room==1){
cout<<"这里没有东西......";
Sleep(1000);
}
else if(room==2){
cout<<"获得钢笔*1";
Sleep(1000);
cout<<endl;
cout<<"红肉面包不能吃";
Sleep(1000);
w[1]=1;
}
else if(room==3){
cout<<"获得红肉面包*1"<<endl<<"获得血水汤粉*1";
cout<<endl<<"";
Sleep(1000);
w[2]=1;
w[3]=1;
}
}
else if(temp==2){
temp=0;
system("cls");
cout<<"要去哪?"<<endl;
cout<<"1、操场;2、教室;3、食堂"<<endl;
temp=0;
while(temp!=1 && temp!=2 && temp!=3){
cin>>temp;
}
if(temp==1){
room=1;//操场
temp=0;
}
else if(temp==2){
room=2;//教室
temp=0;
}
else if(temp==3){
room=3;//食堂
temp=0;
}
}
else if(temp==3){
temp=0;
system("cls");
cout<<"要用啥?"<<endl;
cout<<"1、钢笔;2、红肉面包;3、血水汤粉"<<endl;
temp=0;
while(temp!=2 && temp!=3){
cin>>temp;
}
if(temp==2){
cout<<"你死了......";
Sleep(1000);
temp=0;
ok=1;
}
else if(temp==3){
if(room==3){
cout<<"卖相不咋地,但至少能吃";
cout<<endl;
Sleep(1000);
w[3]=0;
}
else{
cout<<"你死了......";
Sleep(1000);
cout<<endl;
cout<<"你只能在食堂吃东西......";
ok=1;
}
temp=0;
}
}
}
if(win==0){
system("cls");
cout<<"你失败了";
Sleep(1000);
}
else{
system("cls");
cout<<"恭喜,一切该结束了......";
S
}
return 0;
}