跳到正文

休闲·娱乐

休闲小游戏-骗子酒馆new!

aiyou_约 38 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年1月4日
篇幅
约 38 分钟
获赞
1

版本

  1. v1当前

以下是作者复刻的休闲小游戏-骗子酒馆的部分源代码,版权属于原作者,后续作者还会进行更新,请大家尊重原作者,不要对此代码进行恶意的抄袭搬运篡改!
制作者:哎呦©2025
版本号:v1.1.5
迭代日志:见游戏内部
注意:由于有玩家反馈打不开原来的网页,这是作者开的另一个公开网页,如果有其他问题,请及时反馈,作者都会进行调整的!

C++
#include<bits/stdc++.h>
#include<Windows.h>
#include <thread>
using namespace std;
const int maxn = 7;
int a[maxn] = {0,0,0,0,0,0,0};
int b[maxn] = {0,0,0,0,0,0,0};
char ch[13] = {'A','Q','Q','A','K','K','A','Q','Q','K','A','A','A'};
char my[6] = {};
char your[6] = {};
int sum_p = 9;
void colorclear(HANDLE handle) {
	SetConsoleTextAttribute(handle,1 | 2 | 4);
}
int init(int n) {
	if(n == 1) return (rand() % 6) + 1;
	if(n == 2) return (rand() % 13) + 1;
	if(n == 3) {
		sum_p -= (rand() % 5) + 1;
		return (9 - sum_p);
	}
	if(n == 4) {
		return (rand() % 2) + 1;
	}
	return -1;
}
void id(HANDLE handle) {
	system("cls");
	SetConsoleTextAttribute(handle,8);
	cout << "迭代日志:" << endl;
	SetConsoleTextAttribute(handle,2);
	cout << "v1.1.5" << endl;
	cout << "1.修复了上个版本的一些问题:" << endl;
	cout << "(1).修复了嫁祸牌可以在普通模式使用的问题" << endl;
	cout << "(2).修复了终焉版有时候不显示胜负方的问题" << endl;
	cout << "(3).修复了终焉版重复显示胜负方的问题" << endl;
	cout << "2.对游戏引擎进行了部分调整" << endl;
	cout << endl;
	SetConsoleTextAttribute(handle,8);
	cout << "游戏规则:" << endl;
	colorclear(handle);
	cout << "(可能会和正版有所不同)" << endl;
	cout << "开局共有9张不同花色的牌,并且会指定一个系统牌" << endl;
	cout << "玩家需要根据系统牌的花色出1~3张牌,其中Joker视作" << endl;
	cout << "万能牌,可以说谎,下家可以质疑上家出的是假牌,质疑" << endl;
	cout << "成功上家开枪,失败则下家开枪:枪里共有6发子弹,其中" << endl;
	cout << "有1发实弹,5发空弹,开到实弹的玩家可就倒霉了哦~" << endl << endl;
	system("pause");
}
void case1(HANDLE handle,int n) {
	system("cls");
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));
	sum_p = 9;
	int ap = init(1);
	a[ap] = 1;
	int bp = init(1);
	b[bp] = 1;
	int my_bomm = 0;
	int your_bomm = 0;
	int zy_1 = 0;
	int zy_2 = 0;
	int not_die = 0;
	int not_die2 = 0;
	if(n == 2) {
		zy_1 = rand() % 7 + 1;
		zy_2 = rand() % 7 + 1;
		SetConsoleTextAttribute(handle,8);
		cout << "你的回响牌是:" << endl;
		SetConsoleTextAttribute(handle,2);
		if(zy_1 == 2) zy_1 = 3;
		if(zy_2 == 2 || zy_2 == 6) zy_2 = 7;
		if(zy_1 == 1) cout << "[夺心魄]\n开枪环节使用,让场上所有玩家和你一起\n开枪" << endl;
		else if(zy_1 == 3) cout << "[惊雷]\n回合结束时使用,让全场玩家进行判定:有50%\n的概率存活,有50%的概率被天雷劈中开一枪(包括自己)" << endl;
		else if(zy_1 == 4) cout << "[不灭]\n回合开始前使用,让你在接下来的2回合内不灭不死\n若死亡,则复活并重置开枪数" << endl;
		else if(zy_1 == 5) cout << "[生生不息]\n被动技能:死而复生" << endl;
		else if(zy_1 == 6) cout << "[嫁祸]\n开枪环节使用,把自身所受伤害转移到指定\n玩家" << endl;
		else if(zy_1 == 7) cout << "[显灵]\n回合开始前使用,把自己手上所有Ace都看作任意\n牌使用" << endl;
		cout << endl;
		colorclear(handle);
		system("pause");
		system("cls");
	}
	int ace_joker = 0;
	int ace_joker2 = 0;
	while(1) {
		if(not_die > 0) not_die--;
		if(not_die2 > 0) not_die2--;
		if(zy_1 == 4 && n == 2) {
			SetConsoleTextAttribute(handle,8);
			cout << "是否使用回响[不灭]?(0/1)" << endl;
			colorclear(handle);
			int zpp;
			cin >> zpp;
			Sleep(1000);
			if(zpp) {
				SetConsoleTextAttribute(handle,4);
				not_die = 2;
				cout << "你:我听到了[不灭]的回响!\n接下来的2回合内,你将不灭不死!" << endl;
				zy_1 = 0;
			}
		}
		if(zy_2 == 4 && n == 2) {
			int zpp2 = rand() % 2;
			if(zpp2 == 0) {
				SetConsoleTextAttribute(handle,8);
				cout << "对手使用回响中......" << endl;
				Sleep(1000);
				SetConsoleTextAttribute(handle,4);
				cout << "对手:我听到了[不灭]的回响!" << endl;
				not_die2 = 2;
				zy_2 = 0;
			}
		}
		colorclear(handle);
		int p = init(2);
		char ch_p;
		if(ch[p] == 'A') {
			cout << "本轮底牌:Ace" << endl;
			ch_p = 'A';
		} else if(ch[p] == 'Q') {
			cout << "本轮底牌:Queen" << endl;
			ch_p = 'Q';
		} else {
			cout << "本轮底牌:King" << endl;
			ch_p = 'K';
		}
		if(zy_1 == 7 && n == 2) {
			SetConsoleTextAttribute(handle,8);
			cout << "是否使用回响[显灵]?(0/1)" << endl;
			colorclear(handle);
			int zpp;
			cin >> zpp;
			Sleep(1000);
			if(zpp) {
				SetConsoleTextAttribute(handle,4);
				ace_joker = 1;
				cout << "你:我听到了[显灵]的回响!\n在1回合内,你可以把Ace看作任意牌使用!" << endl;
				zy_1 = 0;
			}
		}
		int num2 = rand() % 5;
		if(zy_2 == 7 && n == 2) {
			int zpp2 = rand() % 2;
			if(zpp2 == 0) {
				SetConsoleTextAttribute(handle,8);
				cout << "对手使用回响中......" << endl;
				Sleep(1000);
				SetConsoleTextAttribute(handle,4);
				cout << "对手:我听到了[显灵]的回响!" << endl;
				ace_joker2 = 1;
				if(num2 != 5) num2++;
				zy_2 = 0;
			}
		}
		SetConsoleTextAttribute(handle,8);
		cout << "你的手牌:" << endl;
		SetConsoleTextAttribute(handle,4);
		int num1 = rand() % 5 + 1;
		if(num1 > 5) num1 = 5;
		for(int i = 1; i <= num1; i++) {
			int joker = rand() % 100 + 1;
			if(joker <= 80) {
				my[i] = ch_p;
				cout << ch_p << ' ';
			} else {
				my[i] = 'J';
				cout << 'J' << ' ';
			}
		}
		for(int i = num1 + 1; i <= 5; i++) {
			int pp = init(4);
			if(pp == 1) {
				if(ch_p == 'A') my[i] = 'Q';
				if(ch_p == 'Q') my[i] = 'A';
				if(ch_p == 'K') my[i] = 'A';
			} else {
				if(ch_p == 'A') my[i] = 'K';
				if(ch_p == 'Q') my[i] = 'A';
				if(ch_p == 'K') my[i] = 'Q';
			}
			cout << my[i] << ' ';
		}
		colorclear(handle);
		cout << endl;
		int len1 = 5;
		int len2 = 5;
		SetConsoleTextAttribute(handle,8);
		cout << "本轮游戏由";
		int shunxu = rand() % 2 + 1;
		if(shunxu == 1) cout << "你";
		else cout << "对手";
		cout << "出牌" << endl;
		colorclear(handle);
		int cnt = 0;
		while(cnt == 0) {
			if(shunxu == 1) {
				SetConsoleTextAttribute(handle,4);
				cout << "请输入你想要出的牌的张数(3张以内,若大于三张,视作三张)" << endl;
				colorclear(handle);
				int n;
				cin >> n;
				if(n > 3) n = 3;
				len1 -= n;
				SetConsoleTextAttribute(handle,4);
				cout << "请输入你想要出的牌(用一个空格隔开)" << endl;
				colorclear(handle);
				int right = 1;
				for(int i = 1; i <= n; i++) {
					int x;
					cin >> x;
					if(my[x] != ch_p && my[x] != 'J') {
						if(ace_joker == 1 && my[x] == 'A') {
							right = 1;
						} else {
							right = 0;
						}
					}
					my[x] = '0';
				}
				if(n == 1) cout << "One " << ch_p << "!" << endl;
				else if(n == 2) cout << "Two " << ch_p << "!" << endl;
				else cout << "Three " << ch_p << "!" << endl;
				SetConsoleTextAttribute(handle,8);
				cout << "对手开牌情况:" << endl;
				Sleep(1000);
				colorclear(handle);
				int k = rand() % 100 + 1;
				if(k <= 40 || len1 == 0) {
					SetConsoleTextAttribute(handle,4);
					cout << "Lair!" << endl;
					Sleep(1000);
					if(right == 1) {
						SetConsoleTextAttribute(handle,8);
						cout << "开牌情况:你出的是真牌!" << endl;
						colorclear(handle);
						cnt = 1;
						Sleep(1000);
						break;
					} else {
						SetConsoleTextAttribute(handle,8);
						cout << "开牌情况:你出的是假牌!" << endl;
						colorclear(handle);
						cnt = 2;
						Sleep(1000);
						break;
					}
				} else {
					SetConsoleTextAttribute(handle,4);
					cout << "无" << endl;
					Sleep(1000);
				}
				shunxu = 2;
			} else {
				SetConsoleTextAttribute(handle,8);
				cout << "对手出牌中:" << endl;
				SetConsoleTextAttribute(handle,4);
				Sleep(1000);
				int pai = rand() % 2 + 1;
				if(pai == 1 || num2 == 0) {
					if(5 - num2 == 1) {
						cout << "One " << ch_p << "!" << endl;
						len2 -= 1;
					} else if(5 - num2 == 2) {
						cout << "Two " << ch_p << "!" << endl;
						len2 -= 2;
					} else {
						cout << "Three " << ch_p << "!" << endl;
						len2 -= 3;
					}
					SetConsoleTextAttribute(handle,8);
					cout << "你要开牌吗?(0/1)" << endl;
					colorclear(handle);
					int kai;
					cin >> kai;
					if(kai == 0) {
						shunxu = 1;
						continue;
					} else {
						SetConsoleTextAttribute(handle,4);
						cout << "Lair!" << endl;
						colorclear(handle);
						Sleep(1000);
						SetConsoleTextAttribute(handle,8);
						cout << "开牌情况:对手出的是假牌!" << endl;
						colorclear(handle);
						Sleep(1000);
						cnt = 1;
						continue;
					}
				} else {
					int your = rand() % num2 + 1;
					your %= 3;
					if(your == 1) {
						cout << "One " << ch_p << "!" << endl;
						num2--;
						len2--;
					} else if(your == 2) {
						cout << "Two " << ch_p << "!" << endl;
						num2 -= 2;
						len2 -= 2;
					} else {
						cout << "Three " << ch_p << "!" << endl;
						num2 -= 3;
						len2 -= 2;
					}
					SetConsoleTextAttribute(handle,8);
					cout << "你要开牌吗?(0/1)" << endl;
					colorclear(handle);
					int kai;
					if(len2 > 0) cin >> kai;
					else kai = 1;
					if(kai == 0) {
						shunxu = 1;
						continue;
					} else {
						SetConsoleTextAttribute(handle,4);
						cout << "Lair!" << endl;
						colorclear(handle);
						Sleep(1000);
						SetConsoleTextAttribute(handle,8);
						cout << "开牌情况:对手出的是真牌!" << endl;
						colorclear(handle);
						Sleep(1000);
						cnt = 2;
						continue;
					}
				}
			}
		}
		int jiahuo = 0;
		int jiahuo2 = 0;
		if(cnt == 1) {
			SetConsoleTextAttribute(handle,4);
			cout << "对手开枪中,请稍后" << endl;
			colorclear(handle);
			Sleep(2000);
			your_bomm++;
			if(n == 2 && zy_2 == 1) {
				SetConsoleTextAttribute(handle,8);
				cout << "对手使用回响中......" << endl;
				colorclear(handle);
				Sleep(1000);
				SetConsoleTextAttribute(handle,4);
				cout << "对手:我听到了[夺心魄]的回响!" << endl;
				if(zy_1 == 6) {
					SetConsoleTextAttribute(handle,8);
					cout << "是否使用回响[嫁祸](0/1)?" << endl;
					colorclear(handle);
					int zppp;
					cin >> zppp;
					if(zppp) {
						SetConsoleTextAttribute(handle,4);
						cout << "你:我听到了[嫁祸]的回响!\n将受到的伤害反弹给对手" << endl;
						colorclear(handle);
						Sleep(1000);
						jiahuo = 1;
						zy_1 = 0;
					}
				} else my_bomm++;
				Sleep(1000);
				zy_2 = 0;
			}
			if(your_bomm == bp) {
				if(!not_die2 && n == 1) {
					if(zy_2 != 5 || n == 1) {
						SetConsoleTextAttribute(handle,13);
						cout << "You are the last winner!" << endl;
						colorclear(handle);
						return ;
					} else if(not_die2 && n != 1) {
						SetConsoleTextAttribute(handle,13);
						cout << "对手开枪爆了!" << endl;
						colorclear(handle);
						Sleep(1000);
						SetConsoleTextAttribute(handle,15);
						cout << "对手:我看到了[生生不息]的激荡!" << endl;
						SetConsoleTextAttribute(handle,8);
						cout << "对手复活了!" << endl;
						your_bomm = 0;
						zy_2 = 0;
					}
				} else if(not_die2 && n == 2) {
					SetConsoleTextAttribute(handle,13);
					cout << "对手开枪爆了!!!" << endl;
					Sleep(1000);
					SetConsoleTextAttribute(handle,15);
					cout << "对手:我听到了[不灭]的回响!" << endl;
					SetConsoleTextAttribute(handle,8);
					cout << "对手复活了!" << endl;
					not_die2 = 0;
					your_bomm = 0;
					Sleep(1000);
				}
			}
			if(my_bomm == ap && jiahuo == 0) {
				SetConsoleTextAttribute(handle,14);
				cout << "You are die!" << endl;
				colorclear(handle);
				Sleep(1000);
				if(n == 2 && not_die) {
					SetConsoleTextAttribute(handle,15);
					cout << "你:我听到了不灭的回响!" << endl;
					SetConsoleTextAttribute(handle,8);
					cout << "你复活了!\n重置开枪数中,请稍后......" << endl;
					not_die = 0;
					my_bomm = 0;
					Sleep(2000);
				} else if(zy_1 == 5) {
					SetConsoleTextAttribute(handle,15);
					cout << "你:我看到了生生不息的激荡!" << endl;
					SetConsoleTextAttribute(handle,8);
					cout << "你复活了!\n重置开枪数中,请稍后......" << endl;
					my_bomm = 0;
					zy_1 = 0;
					Sleep(2000);
				}
			} else if(jiahuo == 1) {
				your_bomm = bp;
				jiahuo = 0;
			}
			if(your_bomm == bp) {
				if(!not_die2 && n == 1) {
					if(zy_2 != 5 || n == 1) {
						SetConsoleTextAttribute(handle,13);
						cout << "You are the last winner!" << endl;
						colorclear(handle);
						return ;
					} else if(not_die2 && n != 1) {
						SetConsoleTextAttribute(handle,13);
						cout << "对手开枪爆了!" << endl;
						colorclear(handle);
						Sleep(1000);
						SetConsoleTextAttribute(handle,15);
						cout << "对手:我看到了[生生不息]的激荡!" << endl;
						SetConsoleTextAttribute(handle,8);
						cout << "对手复活了!" << endl;
						your_bomm = 0;
						zy_2 = 0;
					}
				} else if(not_die2 && n == 2) {
					SetConsoleTextAttribute(handle,13);
					cout << "对手开枪爆了!!!" << endl;
					Sleep(1000);
					SetConsoleTextAttribute(handle,15);
					cout << "对手:我听到了[不灭]的回响!" << endl;
					SetConsoleTextAttribute(handle,8);
					cout << "对手复活了!" << endl;
					not_die2 = 0;
					your_bomm = 0;
					Sleep(1000);
				}
			}
		} else {
			SetConsoleTextAttribute(handle,4);
			cout << "开枪中,请稍后" << endl;
			colorclear(handle);
			my_bomm++;
			Sleep(2000);
			if(zy_1 == 6) {
				SetConsoleTextAttribute(handle,8);
				cout << "是否使用回响[嫁祸](0/1)?" << endl;
				colorclear(handle);
				int zppp;
				cin >> zppp;
				if(zppp) {
					SetConsoleTextAttribute(handle,4);
					cout << "你:我听到了[嫁祸]的回响!\n将受到的伤害反弹给对手" << endl;
					colorclear(handle);
					Sleep(1000);
					jiahuo = 1;
					zy_1 = 0;
				}
			}
			if(n == 2 && zy_1 == 1) {
				SetConsoleTextAttribute(handle,8);
				cout << "是否使用回响[夺心魄]?(0/1)" << endl;
				colorclear(handle);
				int zpp;
				cin >> zpp;
				if(zpp) {
					SetConsoleTextAttribute(handle,4);
					cout << "你:我听到了[夺心魄]的回响!\n你的对手将和你一起开枪!" << endl;
					your_bomm++;
					Sleep(1000);
				}
				zy_1 = 0;
			}
			if(my_bomm == ap && jiahuo == 0) {
				SetConsoleTextAttribute(handle,14);
				cout << "You are die!" << endl;
				colorclear(handle);
				Sleep(1000);
				if(n == 2 && not_die) {
					SetConsoleTextAttribute(handle,15);
					cout << "你:我听到了[不灭]的回响!" << endl;
					SetConsoleTextAttribute(handle,8);
					cout << "你复活了!\n重置开枪数中,请稍后......" << endl;
					not_die = 0;
					my_bomm = 0;
					Sleep(2000);
				} else if(zy_1 == 5) {
					SetConsoleTextAttribute(handle,13);
					cout << "你:我看到了[生生不息]的激荡!" << endl;
					SetConsoleTextAttribute(handle,8);
					cout << "你复活了!\n重置开枪数中,请稍后......" << endl;
					my_bomm = 0;
					zy_1 = 0;
					Sleep(2000);
				}
			} else if(jiahuo == 1) {
				your_bomm = bp;
				jiahuo = 0;
			}
			if(your_bomm == bp) {
				if(!not_die2 || n == 1) {
					if(zy_2 != 5 || n == 1) {
						SetConsoleTextAttribute(handle,13);
						cout << "You are the last winner!" << endl;
						colorclear(handle);
						return ;
					} else {
						SetConsoleTextAttribute(handle,13);
						cout << "对手开枪爆了!" << endl;
						colorclear(handle);
						Sleep(1000);
						SetConsoleTextAttribute(handle,14);
						cout << "对手:我看到了[生生不息]的激荡!" << endl;
						SetConsoleTextAttribute(handle,8);
						cout << "对手复活了!" << endl;
						your_bomm = 0;
						zy_2 = 0;
						Sleep(1000);
					}
				} else if(not_die2 && n == 2) {
					SetConsoleTextAttribute(handle,13);
					cout << "对手开枪爆了!!!" << endl;
					Sleep(1000);
					SetConsoleTextAttribute(handle,15);
					cout << "对手:我听到了[不灭]的回响!" << endl;
					SetConsoleTextAttribute(handle,8);
					cout << "对手复活了!" << endl;
					not_die2 = 0;
					your_bomm = 0;
					Sleep(1000);
				}
			}
		}
		ace_joker = 0;
		ace_joker2 = 0;
		if(zy_1 == 3) {
			SetConsoleTextAttribute(handle,8);
			cout << "是否使用回响[惊雷]?(0/1)" << endl;
			colorclear(handle);
			int zpp;
			cin >> zpp;
			if(zpp) {
				SetConsoleTextAttribute(handle,4);
				cout << "你:我听到了[惊雷]的回响!\n全场人进行判定" << endl;
				Sleep(1000);
				SetConsoleTextAttribute(handle,8);
				cout << "正在判定你:" << endl;
				int judge = rand() % 2 + 1;
				Sleep(1000);
				if(judge == 1) {
					SetConsoleTextAttribute(handle,2);
					cout << "判定成功!" << endl;
				} else {
					SetConsoleTextAttribute(handle,4);
					cout << "判定失败,开一枪!" << endl;
					my_bomm++;
					if(my_bomm == ap) {
						SetConsoleTextAttribute(handle,14);
						cout << "You are die!" << endl;
						colorclear(handle);
						Sleep(2000);
						return ;
					}
				}
				Sleep(1000);
				SetConsoleTextAttribute(handle,8);
				cout << "正在判定对手:" << endl;
				Sleep(1000);
				judge = rand() % 2 + 1;
				if(judge == 1) {
					SetConsoleTextAttribute(handle,2);
					cout << "判定成功!" << endl;
				} else {
					SetConsoleTextAttribute(handle,4);
					cout << "判定失败,对手开一枪!" << endl;
					your_bomm++;
					if(your_bomm == bp) {
						SetConsoleTextAttribute(handle,13);
						cout << "You are the last winner!" << endl;
						colorclear(handle);
						Sleep(2000);
						return ;
					}
				}
				colorclear(handle);
				zy_1 = 0;
			}
		}
		if(zy_2 == 3) {
			int zpp = rand() % 2;
			if(zpp) {
				SetConsoleTextAttribute(handle,8);
				cout << "对手使用回响中......" << endl;
				colorclear(handle);
				Sleep(1000);
				SetConsoleTextAttribute(handle,4);
				cout << "对手:我听到了[惊雷]的回响!" << endl;
				Sleep(1000);
				SetConsoleTextAttribute(handle,8);
				cout << "正在判定对手:" << endl;
				Sleep(1000);
				int judge = rand() % 2 + 1;
				if(judge == 1) {
					SetConsoleTextAttribute(handle,2);
					cout << "判定成功!" << endl;
				} else {
					SetConsoleTextAttribute(handle,4);
					cout << "判定失败,对手开一枪!" << endl;
					your_bomm++;
					if(your_bomm == bp) {
						SetConsoleTextAttribute(handle,13);
						cout << "You are the last winner!" << endl;
						colorclear(handle);
						Sleep(2000);
						return ;
					}
				}
				SetConsoleTextAttribute(handle,8);
				cout << "正在判定你:" << endl;
				judge = rand() % 2 + 1;
				Sleep(1000);
				if(judge == 1) {
					SetConsoleTextAttribute(handle,2);
					cout << "判定成功!" << endl;
				} else {
					SetConsoleTextAttribute(handle,4);
					cout << "判定失败,开一枪!" << endl;
					if(zy_1 == 6) {
						SetConsoleTextAttribute(handle,8);
						cout << "是否使用回响[嫁祸](0/1)?" << endl;
						colorclear(handle);
						int zppp;
						cin >> zppp;
						if(zppp) {
							SetConsoleTextAttribute(handle,4);
							cout << "你:我听到了[嫁祸]的回响!\n将受到的伤害反弹给对手" << endl;
							colorclear(handle);
							Sleep(1000);
							jiahuo = 1;
							zy_1 = 0;
						}
					}
					my_bomm++;
					if(my_bomm == ap) {
						if(jiahuo == 0) {
							SetConsoleTextAttribute(handle,14);
							cout << "You are die!" << endl;
							colorclear(handle);
							Sleep(2000);
						} else {
							SetConsoleTextAttribute(handle,13);
							cout << "You are the last winner!" << endl;
							colorclear(handle);
							Sleep(2000);
						}
						return ;
					}
					jiahuo = 0;
				}
				Sleep(1000);
				colorclear(handle);
				zy_2 = 0;
			}
		}
		SetConsoleTextAttribute(handle,1);
		cout << "你的子弹数:" << my_bomm << "/6" << endl;
		cout << "对方子弹数:" << your_bomm << "/6" << endl;
		Sleep(2000);
		colorclear(handle);
		if(your_bomm == bp) {
			SetConsoleTextAttribute(handle,13);
			cout << "恭喜你胜利了!!!" << endl;
			Sleep(2000);
			colorclear(handle);
			return ;
		}
		if(my_bomm == ap) {
			SetConsoleTextAttribute(handle,14);
			cout << "你失败了,再接再厉哦!" << endl;
			Sleep(2000);
			colorclear(handle);
			return ;
		}
		system("cls");
	}
	system("cls");
}
int main() {
	srand(time(0));
	HANDLE handle;
	handle = GetStdHandle(STD_OUTPUT_HANDLE);
	HWND hWnd;
	hWnd = GetConsoleWindow();
	int game_case;
	while (true) {
		system("cls");
		SetConsoleTextAttribute(handle,1);
		cout << "骗";
		SetConsoleTextAttribute(handle,2);
		cout << "子";
		SetConsoleTextAttribute(handle,4);
		cout << "8+1";
		SetConsoleTextAttribute(handle,2 | 4);
		cout << "馆" << endl;
		colorclear(handle);
		cout << "版本号:v1.1.5" << endl;
		cout << "编译环境:win32  编译器:Dev-C++ 5.11" << endl;
		SetConsoleTextAttribute(handle,8);
		cout << "请选择游戏模式" << endl;
		colorclear(handle);
		cout << "1.双人模式(普通)" << endl;
		cout << "2.双人模式(终焉)" << endl;
		cout << "3.三人模式(普通)(未开发)" << endl;
		cout << "4.三人模式(终焉)(未开发)" << endl;
		cout << "5.迭代日志+游戏规则" << endl;
		cin >> game_case;
		if(game_case == 1) {
			case1(handle,1);
		} else if(game_case == 2) {
			case1(handle,2);
		} else if(game_case >= 3 && game_case <= 4) {
			MessageBoxA(hWnd,"该功能暂未开放,敬请期待","Error",MB_YESNO | MB_ICONWARNING);
		} else if(game_case == 5) {
			id(handle);
		} else {
			MessageBoxA(hWnd,"没有识别到该关卡,请检查您的输入","Error",MB_YESNO | MB_ICONERROR);
		}
	}
	return 0;
}
原文