-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.h
71 lines (67 loc) · 1.87 KB
/
Player.h
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
67
68
69
70
71
#ifndef PLAYER_H
#define PLAYER_H
#include <string>
#include <cctype>
#include "FloorLine.h"
#include <iostream>
#include "Mosaic.h"
#include "PatternLine.h"
#include "vector"
class Player{
public:
//constructor
Player(std::string name);
// overloaded constructor to be used in the loading of player data
Player(std::string name, int score, bool isTurn, Mosaic* mosaicLoad, FloorLine* FloorLineLoad, PatternLine* patternLineLoad);
// destructor
~Player();
// get player score
int getScore();
// get player name
std::string getName();
// check if it is player turn
bool getTurn();
// set the player turn
void setIsTurn(bool isTurn);
// add player points
void addPoints(int points);
// displayer player game board
void displayGameboard();
// get player floor line
FloorLine* getFloorLine();
//get player patternline
PatternLine* getPatternLine();
//get player mosaic/wall
Mosaic* getMosaic();
//move tiles from the pattern line to mosaic
std::vector<Tile*> makeTileMosaicUppercase();
// update player score
LinkedList* scoring();
// update the score according to the player floorline
LinkedList* checkBrokenTiles();
// support function for the score
void countColours();
// support function for the score
void scoreColours();
// get the score board, support function for the score
char** getScoreBoard();
private:
std::string name;
int score;
bool isTurn;
Mosaic* mosaic;
FloorLine* playerFloorLine;
PatternLine* playerPatternLine;
std::vector<int> checkRow;
std::vector<int> checkColumn;
bool checkingRow;
bool checkingColumn;
char** scoringBoard;
int blackCounter = 0;
int lightblueCounter = 0;
int blueCounter = 0;
int yellowCounter = 0;
int redCounter = 0;
bool* colourTiles;
};
#endif //PLAYER_H