#include<windows.h>
#include<conio.h>
#include<wincon.h>
#include<string>
#include<vector>
#include<algorithm>
#include<ctime>
#include<cmath>
#include<iostream>
#include<map>
#pragma GCC optimize(3)
using namespace std;
const int most=11,begin_n=10;
struct pai{
string name;
int color;
} shang,begin;
vector<pai> a[25];
struct all{
string all_name;
int color,number;
} b[1+13*4+2];
string Color,Name,beginNames[3]={
"stop","back","+2"},gnp[5]={
"stop","back","+2","+4","change color"},alltyps[15]={
" ","1","2","3","4","5","6","7","8","9","stop","back","+2","+4","change color"},allcolors[4]={
"blue","green","red","yellow"};
long long ej=1;
int z,e,f,colors[5]={
0,1,2,4,6},flag,place,beginColors[4]={
1,2,4,6};
bool players[1000];
const char* help[21]=
{
"┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ",
"│ 帮助 │ ",
"│ 按下'<-'键,上一张牌 │ ",
"│ 按下'->'键,下一张牌 │ ",
"│ 按下'Esc'键,退出游戏 │ ",
"│ 按下'Enter'键,确认下牌 │ ",
"│ 按下's'键,设置 │ ",
"┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ ",
"│ 规则 │ ",
"│ 游戏开始,程序会自动为每人 │ ",
"│随机发6张牌。 │ ",
"│ 每次出牌时,如果牌中有和上 │ ",
"│一次一样的数字,有和上一次一样│ ",
"│的颜色,有+4或change color就可│ ",
"│以出满足条件的牌否则,程序就会│ ",
"│随机为你抽取一张牌(可以选择, │ ",
"│在设置中更改)。 │ ",
"│ 遵循以上规则,谁的牌先下完│ ",
"│谁就赢了(注:但如果自己的牌超│ ",
"│过了11张,那会直接退出) │ ",
"┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ "};
const char* help2[21]=
{
"┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ",
"│ 帮助 │ ",
"│ │ ",
"│ 按下任意字母键,下一张牌 │ ",
"│ │ ",
"│ 按下'Enter'键,确认 │ ",
"│ │ ",
"┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ ",
"│ 规则 │ ",
"│ 游戏开始,程序会自动为每人 │ ",
"│随机发6张牌。 │ ",
"│ 每次出牌时,如果牌中有和上 │ ",
"│一次一样的数字,有和上一次一样│ ",
"│的颜色,有+4或change color就可│ ",
"│以出满足条件的牌否则,程序就会│ ",
"│随机为你抽取一张牌 │ ",
"│ 遵循以上规则,谁的牌先下完│ ",
"│谁就赢了 │ ",
"│ │ ",
"│ │ ",
"┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ "};
int Cards_Shape[10][19][30]={
{
{
0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0},
{
0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0},
{
0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0},
{
0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0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