一天后,KFC模拟器完成了!
鸡块判断条件好像没做
至少做出来了,6/22 16:04 位置图书馆
希望玩的开心:)
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int a[5],hbzl=0,money=0,day=1;
int hb(int hbzl){
if(hbzl==10)return 1;
else if(hbzl==11)return 2;
else if(hbzl==6)return 4;
else if(hbzl==12)return 3;
else if(hbzl==18)return 9;
}
int main(){
cout<<"请放大屏幕\n";
Sleep(3000);
system("pause&&cls");
cout<<"店长:\n";
Sleep(1000);
cout<<"欢迎来到KFC,新人!\n";
Sleep(1000);
cout<<"你会在这里学到很多,但记住:不要心急。\n";
Sleep(1500);
cout<<"emm";
for(int i=1;i<=6;i++){
Sleep(400);
cout<<".";
}cout<<endl;
Sleep(500);
cout<<"我觉得你该去熟悉工作了,";
Sleep(800);
cout<<"祝你好运!回见!(笑—)\n";
system("pause&&cls");
cout<<"进入新手教程吗?1 or 0\n";
int n;
cin>>n;
if(n==1){
cout<<"好的,进入新手教程";
Sleep(2000);
system("cls");
cout<<"店员:\n";
Sleep(1000);
cout<<"Hi~我来教你做食物吧!\n";
Sleep(500);
system("pause&&cls");
cout<<"食物配方:汉堡\n";
Sleep(500);
cout<<"生菜、芝士、西红柿\n";
Sleep(1000);
cout<<"(顾客需要牛肉汉堡就加牛肉,";
Sleep(500);
cout<<"鸡腿和其他一样)\n";
Sleep(1000);
cout<<"来试试吧!";
Sleep(700);
system("pause&&cls");
cout<<"顾客:\n";
Sleep(1000);
cout<<"我想要一个牛肉汉堡,谢谢\n\n";
Sleep(1500);
while(1){
cout<<"1生菜,2芝士,3西红柿,4牛肉,5香肠,6鸡肉,7土豆\n";
Sleep(500);
cout<<"共四项,多的输0\n";
Sleep(500);
cout<<"如需可乐,再输入一个'#'\n";
hbzl=0;
for(int i=1;i<=4;i++){
cin>>a[i];
hbzl+=a[i];
}if(hb(hbzl)==1){
cout<<"太好了!做的不错!\n";
Sleep(1000);
break;
}else cout<<"调整下配方吧!\n";
Sleep(1000);
system("cls");
}cout<<"看来你已经学会了做汉堡,接下来开始工作吧!\n";
Sleep(2000);
}else{
cout<<"已为您跳过新手教程\n";
}while(1){
system("pause&&cls");
int m;
cout<<"现在干什么?\n";
cout<<"1开始工作,2配方,3个人面板,4辞职\n";
cin>>m;
system("pause&&cls");
if(m==4){
if(money>=100000){
cout<<"店长:\n";
Sleep(1000);
cout<<"恭喜你!终于赚够了钱。(笑—)\n";
Sleep(1000);
cout<<"距离你刚来这里,已经有"<<day<<"天了吧。(苦笑)\n";
Sleep(1000);
cout<<"不要忘记:不用心急啊!(泪—)\n\n";
Sleep(1000);
cout<<"新员工(合):再见了!前辈!\n";
}else{
cout<<"店长:\n";
Sleep(1000);
cout<<"好吧,我尊重你。\n";
Sleep(1000);
cout<<"距离你刚来这里,也有"<<day<<"天了吧。(苦笑)\n";
Sleep(1000);
cout<<"无论在干什么事,都不要忘记:不用心急啊!(泪—)\n\n";
Sleep(1000);
cout<<"员工(合):再见了!朋友!\n";
}Sleep(3000);
system("pause&&cls");
break;
}else if(m==2){
system("cls");
cout<<"牛肉汉堡:生菜,西红柿,芝士,牛肉\n";
cout<<"香肠汉堡:生菜,西红柿,芝士,香肠\n";
cout<<"鸡肉汉堡:生菜,西红柿,芝士,鸡肉\n";
cout<<"菜堡:生菜,西红柿,芝士,0\n";
cout<<"纯肉汉堡:生菜,牛肉,鸡肉,香肠\n";
cout<<"\n鸡块:鸡肉,土豆\n";
Sleep(4000);
system("pause&&cls");
}else if(m==3){
cout<<"天数:"<<day<<endl;
cout<<"钱:"<<money<<" RMB\n";
if(money>400)cout<<"距离退休还有"<<100000-money<<"RMB\n";
system("pause&&cls");
}else if(m==1){
int hb1,cole,hb2,xb,xt1=0;
int jrsh=0,kc=0,zsy=0;
while(1){
hbzl=0;
cout<<"下班吗?1 or 0\n";
cin>>xb;
system("cls");
if(xb==1){
cout<<"今日收获:"<<jrsh<<"元\n";
cout<<"扣除:"<<kc<<"元\n";
zsy=jrsh-kc;
cout<<"今日总收益:"<<zsy<<"元\n";
cout<<"总钱数:"<<money<<"元\n";
day++;
break;
}srand(time(0));
hb1=rand()%6;
srand(time(0));
cole=rand()%2;
if(hb1==0&&cole==0){
cout<<"有小偷!按1抓小偷!\n";
int xt;
cin>>xt;
if(xt==1){
cout<<"见义勇为,获得10元\n";
money+=10;
jrsh+=10;
}else{
cout<<"小偷偷了你的66元\n";
money-=66;
kc+=66;
}xt1=1;
system("cls");
}if(hb1==1){
cout<<"顾客:我需要牛肉汉堡";
hb2=1;
}else if(hb1==2){
cout<<"顾客:我需要香肠汉堡";
hb2=2;
}else if(hb1==3){
cout<<"顾客:我需要鸡肉汉堡";
hb2=3;
}else if(hb1==4){
cout<<"顾客:我需要菜堡";
hb2=4;
}else if(hb1==5){
cout<<"顾客:我需要纯肉汉堡";
hb2=9;
}else if(hb1==0){
cout<<"顾客:我只要可乐,谢谢!\n";
Sleep(2000);
cout<<"可乐=#\n";
char a2;
cin>>a2;
if(a2=='#'){
cout<<"顾客:谢谢你!这是三元。\n";
money+=3;
jrsh+=3;
}else{
cout<<"顾客:退钱!!!!\n";
Sleep(4000);
system("cls");
Sleep(1000);
cout<<"老板又扣了你2元。。。\n";
money-=2;
kc+=2;
}
}if(cole==1)cout<<"和可乐";
if(xt1!=1){
cout<<endl;
Sleep(1000);
cout<<"1生菜,2芝士,3西红柿,4牛肉,5香肠,6鸡肉,7土豆\n";
Sleep(500);
cout<<"共四项,多的输0\n";
Sleep(500);
cout<<"如需可乐,再输入一个'#'\n";
for(int i=1;i<=4;i++){
cin>>a[i];
hbzl+=a[i];
}if(cole==1){
char a1;
cin>>a1;
money+=3;
jrsh+=3;
}if(hb(hbzl)==hb2){
cout<<"顾客:做的不错!\n";
money+=hbzl;
jrsh+=hbzl;
}else{
cout<<"顾客:这不是我要的!\n";
Sleep(1000);
system("cls");
cout<<"顾客给了差评,老板扣了你5元\n";
money-=5;
kc+=5;
Sleep(2000);
}Sleep(1000);
}system("cls");
}
}
}cout<<"游戏结束。。。\n";
Sleep(2000);
cout<<"总钱数:";
Sleep(1000);
cout<<money;
Sleep(3000);
return 0;
}