-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHandcard.h
More file actions
66 lines (57 loc) · 1.92 KB
/
Handcard.h
File metadata and controls
66 lines (57 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef Handcard_h
#define Handcard_h
#include <iostream>
#include <string>
#include <vector>
#include "Pair.h"
#include "Single.h"
#include "Play.h"
#include "Three.h"
using namespace std;
class Handcard
{
public:
vector <Card> hand;
int min(int);
void swap(Card&,Card&);
void sort();
void printall();
void popout();
vector <Pair> myPair;
vector <Single> mySingle;
vector <Three> myThree;
vector <Four> myFour;
vector <Straight> myStraight;
vector <Straight> myFlushStraight;
static int passnum;
int nextface(int);//after sorting,start from the card of the parameter int number,seeking the next different face card,return its subscript(to judge straight)
void userputPair();//if chosen, it still can be judge as pair
void putPair();//seek all pair,put into a vector
void userputThree();//three can be judge as pair
void putThree();//seek all Three of kind, put into a vector
void putFour();//seek all Four of kind, put into a vector
void putStraight(); //seek all Straight, putvvector
void putSingle();//seek all Single, put into a vector
void classify();//execute all the function above
void userclassify();//pair can be judge as single
void judgeclassify();// every card can not be classify repeatedly
int minPair(int);
int minSingle(int);
int minThree(int);
int minFour(int);
int minStraight(int);
int minFlushStraight(int);
void sortingPair();
void sortingSingle();
void sortingThree();
void sortingFour();
void sortingStraight();
void sortingFlushStraight();
Play playcardAI(Play,int, vector<Card> &);//new
Play freecardAI(int , vector<Card> &);//new
bool judgecard(Play,int ,vector<int>);
Play userplaycard(Play,vector<int>, vector<Card> &);
bool club3();
int kindswitch();
};
#endif