游戏《小偷模拟器》

为了此游戏,我花了6小时34分钟2秒的时间,终于做好了,后期接着更新

警告大家,游戏归游戏,禁止模仿

#include<iostream>
#include<cstdio> 
#include<cmath> 
#include<cstdlib>
#include<ctime>
#include<windows.h>
#include<cstring>
#include<algorithm>
#include<iomanip>
#include<conio.h>
#include<bits/stdc++.h>
using namespace std;
int main(){
int h,g,m,n;
m=0;
n=0;
srand(time(0));
cout<<"小偷模拟器"<<endl<<"*被警察抓住会在60秒后关机,输入110可解除但会罚款*%请勿模仿%"; 
Sleep(3000);
system("cls");
while(1){
cout<<"你有"<<m<<"元"<<endl<<"你有银行卡"<<n<<"张"<<endl;
cout<<"你要去哪里"<<endl;
cout<<"1,普通房"<<endl<<"2,防盗房"<<endl<<"3,普通房2*至少有1000元*"<<endl<<"4,防盗房2*至少有3000元*"<<endl<<"5,警察局*去一次花500元*"<<endl<<"6,取款机*需要银行卡*"<<endl;
cin>>h;
if(h==110){
system("shutdown -a"); 
if(m>=500){
m-=500;
}else{
m=0;
}
if(n>=1){
n--;
}
}
if(h==1){
system("cls");
g=rand()%10+1;
if(g>3){
cout<<"没人在家%90成功 *"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g!=1){
cout<<"成功"<<endl;
m+=100;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60"); 
}
}
}else{
cout<<"有人在家%60成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g>4){
cout<<"成功"<<endl;
m+=100;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60"); 
}
}
}
}
if(h==2){
system("cls");
g=rand()%10+1;
if(g>5){
cout<<"没人在家%70成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g&&1&&g!=2&&g!=3){
cout<<"成功"<<endl;
m+=300;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60"); 
}
}
}else{
cout<<"有人在家%40成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g>6){
cout<<"成功"<<endl;
m+=300;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60"); 
}
}
}
}
if(h==3&&m>=1000){
system("cls");
g=rand()%10+1;
if(g>9){
cout<<"没人在家%90成功 *"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g!=1){
cout<<"成功"<<endl;
m+=300;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60"); 
}
}
}else{
cout<<"有人在家%60成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g>4){
cout<<"成功"<<endl;
m+=300;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60"); 
}
}
}
}
if(h==4&&m>=3000){
system("cls");
g=rand()%10+1;
if(g>9){
cout<<"没人在家%70成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g&&1&&g!=2&&g!=3){
cout<<"成功"<<endl;
m+=500;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60"); 
}
}
}else{
cout<<"有人在家%40成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g>6){
cout<<"成功"<<endl;
m+=500;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60"); 
}
}
}
}
if(h==5&&m>=500){
m=m-500;
system("cls");
cout<<"二十四小时有人在%30得到银行卡"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1||h==2||h==3){
g=rand()%10+1;
if(g==1){
cout<<"成功"; 
n++;
}else{
cout<<"失败"; 
system("shutdown -s -t 60"); 
}
}
}
if(h==6&&n>0){
system("cls");
cout<<"你得到了5000元";
m+=5000;
n--;
}
Sleep(2000);
system("cls");
}
return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值