-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
44 lines (39 loc) · 980 Bytes
/
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
#ifndef PLAYER_H
#define PLAYER_H
#include "blockFactory.h"
#include "board.h"
#include "level0Factory.h"
#include "level1Factory.h"
#include "level2Factory.h"
#include "level3Factory.h"
#include "level4Factory.h"
#include "queue.h"
/**
* Prime factorization of effects:
* 1: none
* 2: heavy
* 3: blind
* 5,7,11,13,17,19,23: force I, J, L, O, S, T, Z respectively
*/
class Player {
friend class Game; // Game should have to access to Player's privates
Board gameBoard;
std::unique_ptr<BlockFactory> blockFactory;
int score;
int score5turnsago;
int level;
int effect;
int triggereffect;
int seed;
std::string filename;
std::unique_ptr<Queue> q;
public:
Player(std::string filename = "", int score = 0, int level = 0, int effect = 1);
void setBlind(bool blind);
void setHeavy(bool heavy);
void setForce(std::string block);
bool setLevel(int level);
int clearRow();
~Player();
};
#endif // !PLAYER_H