-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.h
More file actions
52 lines (38 loc) · 1.33 KB
/
Player.h
File metadata and controls
52 lines (38 loc) · 1.33 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
#pragma once
#include <vector>
#include <algorithm>
using namespace std;
#include "Card.h"
#include "AI.h"
#include "TestAI.h"
#include "FireAI.h"
class Player
{
protected:
vector<Card> hand;
int playerNumber;
AI * theAI;
vector<int> handSizes;
vector<vector<int>> pointsPerHand;
vector<int> games;
bool validPlay(int index, Card justPlayed, Color choosenCardColor, bool justDrew, vector<int> scores, vector<int> cardAmountsByPlayer, vector<Card> cardsInHand);
public:
Player(int num, int whichAI);
//if you desire to keep track of what cards other people played...
void onOtherPlayerMove(int playerNumber, Card justPlayed, Color choosenCardColor);
void onOtherPlayerDraw(int playerNumber);
int makeMove(Card justPlayed, Color choosenCardColor, bool justDrew, vector<int> scores, vector<int> cardAmountsByPlayer, int direction) //the returned int refers to the index of which card is played in your hand.
;
Color getNewColor();
void clearHand();
void addToHand(Card c);
void removeCardFromHand(int indexOfCard);
vector<Card> getHandCopy();
int mostRecent = 0;
//int whichAI;
vector<float> diff;
int updateStats(vector<Player*> thePlayers);
void printStats(vector<Player*> thePlayers);
string getName() { return theAI->getName(); }
int getNum() { return theAI->getNum(); }
};