跳到正文

个人记录

简单的小游戏2

j2k183约 6 分钟
原文
文章信息与版本

文章信息

发布
2023年8月21日
收录
2025年12月12日
更新
2026年11月14日
篇幅
约 6 分钟

版本

  1. v1当前

又是一个简单的游戏啊
这个游戏曾经凭借一个坑把我同学(C++课上的)气的想打我
至于是什么坑,玩了就知道了(反正不是关机)

C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main()
{
	int s;
	cout<<"NFLSXC逃学大战开始"<<endl;
	Sleep(1000);
	cout<<"属性介绍(你):"<<endl;
	cout<<"武力值:★★★"<<endl;
	cout<<"速度值:★★★☆"<<endl;
	cout<<"口才值:★★★★★(别称三寸不烂之舌)"<<endl;
	Sleep(5000);
	cout<<"你想翘课,你要在什么时候跑?"<<endl;
	cout<<"1.上课时 2.下课时"<<endl;
	cin>>s;
	if(s==1)
	{
		cout<<"课代表:“老师,这人逃课!”"<<endl;
		cout<<"速度值对比:你:★★★☆   课代表:★★★★"<<endl;
		Sleep(1000);
		cout<<"你被课代表抓住!"<<endl;
		cout<<"失败";
		Sleep(3000);
		return 0;
	}
	else
	{
		cout<<"往哪里跑?"<<endl;
		cout<<"1.操场 2.回字廊(不懂称呼别选)"<<endl;
		cin>>s;
		if(s==1)
		{
			cout<<"一老师怀疑了你"<<endl;
			cout<<"1.“我是来上体育课的” 2.溜了"<<endl;
			cin>>s;
			if(s==1)
			{
				cout<<"老师:“那就去吧。”"<<endl;
				cout<<"老师已离开"<<endl;
				Sleep(1000);
				cout<<"你突然被抓住!"<<endl;
				Sleep(500);
				cout<<"你回头一看:班主任!"<<endl;
				Sleep(300);
				cout<<"你奋力挣扎"<<endl;
				cout<<"武力值对比:你:★★★   班主任:★★★★☆"<<endl;
				Sleep(1000);
				cout<<"你被抓回了教室"<<endl;
				cout<<"失败";
				Sleep(3000);
				return 0; 
			}
			else
			{
				cout<<"老师:“哪里跑!”"<<endl;
				cout<<"速度值对比:你:★★★☆   老师:★★★★☆"<<endl;
				Sleep(1000);
				cout<<"你被老师抓住!"<<endl;
				cout<<"失败";
				Sleep(3000);
				return 0; 
			}
		}
		else
		{
			cout<<"为了躲人,你绕着回字廊转圈圈"<<endl;
			Sleep(1000);
			cout<<"体育老师向你藏身的地方走来......"<<endl;
			cout<<"1.逃跑 2.不动"<<endl;
			cin>>s;
			if(s==1)
			{
				cout<<"体育老师被惊动,追上了你!"<<endl;
				cout<<"失败"<<endl;
				Sleep(3000);
				return 0; 
			}
			else
			{
				cout<<"--------------------------------"<<endl;
				cout<<"Process exited after 24.87 seconds with return value 3221225477"<<endl;
				cout<<"请按任意键继续. . .";
				system("pause>nul");
				cout<<endl<<"没想到你居然识破了我的陷阱!"<<endl;
				Sleep(1000);
				cout<<"好吧,游戏继续!"<<endl;
				Sleep(800);
				cout<<"虚惊一场:体育老师没看见你!"<<endl;
				cout<<"友情提醒:下节上体育,同学们要下来了"<<endl;
				cout<<"2000 years later......"<<endl;
				Sleep(5000);
				cout<<"同学们下来了,但没看到你"<<endl;
				Sleep(3000);
				cout<<"一位迟到的同学貌似看见了你!"<<endl;
				cout<<"1.尝试说服他 2.逃跑"<<endl;
				cin>>s;
				if(s==1)
				{
					cout<<"口才值对比:你:★★★★★   迟到的同学:★★★★☆"<<endl;
					cout<<"你说服了他,他决定保守秘密"<<endl;
					Sleep(2000);
					cout<<"下节信息课,你顺利熬过"<<endl;
					cout<<"快放学了,你要......"<<endl;
					cout<<"1.单人出去 2.尝试混进队伍 3.不出"<<endl;
					cin>>s;
					switch(s)
					{
						case 1:
							cout<<"被保安拦住"<<endl;
							cout<<"武力值对比:你:★★★   保安:★★★★★"<<endl;
							cout<<"失败";
							Sleep(3000);
							return 0; 
						case 2:
							srand(time(0));
							if(rand()%5==2)
							{
								cout<<"混出去了!"<<endl;
								cout<<"胜利!";
								Sleep(3000);
								return 0;
							}
							else
							{
								cout<<"被那班的老师发现"<<endl;
								cout<<"失败";
								Sleep(3000);
								return 0;
							}
						case 3:
							cout<<"被班主任抓住"<<endl;
							cout<<"失败";
							Sleep(3000);
							return 0;
					}
				}
				else
				{
					cout<<"他看到了你,并报告了老师"<<endl;
					cout<<"失败"<<endl;
					Sleep(3000);
					return 0;
				}
			}
		}
	}
	return 0;
}
原文
存档评论3 条抓取于