uno卡牌c++实现(+4,change color未完成)

#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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,0,0,0,0,0,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,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,0,0,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,0,1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值