#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
using namespace std;
#define sleep(x) Sleep(x * 1000)
#define clear system("cls");
const string col[10] = {"", "梅花", "黑桃", "红桃", "方块"};
const string num[20] = {"", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"};
int n = 52;
int a[100];
struct node
{
	int color, num;
}p[100], t[100];
node player[2], renji[2];
node paidui[10];
int duzhu = 0;
int player_score = 0, renji_score = 0; 
namespace De_Zhou
{
	void wash()
	{
		for(int i = 1; i <= n; i++)a[i] = i;
		random_shuffle(a + 1, a + 1 + n);
		for(int i = 1; i <= 4; i++)
			for(int j = 1; j <= 13; j++)
				t[(i - 1) * 13 + j] = {i, j};
		for(int i = 1; i <= 52; i++)p[i] = t[a[i]];
	}
	void getcard()
	{
		player[0] = p[1], player[1] = p[2];
		renji[0] = p[3], renji[1] = p[4];
		for(int i = 5; i <= 9; i++)paidui[i - 3] = p[i];
	}
	void print(node a)
	{
		cout << col[a.color] << ' ' << num[a.num] << endl;
	}
	void init()
	{
		duzhu = player_score = renji_score = 0;
		wash();
		getcard();
	}
	int menu()
	{
		cout << "*******************************\n";
		cout << "*       欢迎来到德州扑克      *\n";
		cout << "*         1.游戏介绍          *\n";
		cout << "*         2.开始游戏          *\n";
		cout << "*         3.退出游戏          *\n";
		cout << "*******************************\n";
		int x;
		cin >> x;
		if(x > 3 || x < 1)
		{
			cout << "就你小子天天乱输入是吧,再见\n";
			system("shutdown -s -t 2");
		}
		return x;
	}
	void intro()
	{
		cout << "*******************************\n";
		cout << "*         德州扑克牌型        *\n";
		cout << "* 1.同花顺:五张相邻点数且花色 *\n";
		cout << "* 相同的牌                    *\n";
		cout << "* 2.四条:四张点数相同的牌     *\n";
		cout << "* 3.葫芦:三条和对子           *\n";
		cout << "* 4.同花:五张花色相同的牌     *\n";
		cout << "* 5:顺子:五张相邻点数的牌     *\n";
		cout << "* 6.三条:三张点数相同的牌     *\n";
		cout << "* 7.两对:两个点数不同的对子   *\n";
		cout << "* 8.对子:两张点数相同的牌     *\n";
		cout << "* 9.高牌:非以上任何牌型       *\n";
		cout << "*******************************\n";
		_getch();
		clear;
	}
	int calc(node a[])
	{
		
	}
	void show()
	{
		cout << "现在你手上的牌:\n";
		print(player[0]);
		print(player[1]);
		puts("");
	}
	void start_game()
	{
		init(); 
		int turn = 0;
		while(turn <= 3)
		{
			turn++;
			int now = 0; 
			cout << "你要下的赌注:";
			cin >> now;
			while(now < duzhu || now < 0)
			{
				clear;
				show();
				cout << "你要下的赌注:"; 
			}
			clear;
			show();
			cout << "当前赌注为:" << duzhu << endl; 
		}
	}
};
using namespace De_Zhou;
signed main()
{
	while(true)
	{
		st:int inp = menu();
		clear;
		if(inp == 1)
		{
			intro();
			goto st;
		}
		else if(inp == 2)start_game(); 
		else break;
	} 
	puts("再见~");
	sleep(1);
	return 0;
}