-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.h
61 lines (56 loc) · 1.48 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
#ifndef PLAYER_H
#define PLAYER_H
#include <string>
#include "levels.h"
#include "block.h"
#include "levelzero.h"
#include "levelone.h"
#include "leveltwo.h"
#include "levelthree.h"
#include "levelfour.h"
#include "levelfive.h"
#include "levelsix.h"
/* PLAYER
* A player is owned by a grid
* but a graphic class and textdisplay class
* also have (HAS-A) grid.
* A player OWNS-A level (this->l) and OWNS 2 block pointers,
* the current and next block of the player
* (this->b and this->bnext)
*/
class Player {
int score;
const std::string name;
std::shared_ptr<levels> l;
int level;
bool bonus;
bool blind;
//bool levelHeavy;
std::string file;
std::shared_ptr<Block> b = nullptr;
std::shared_ptr<Block> bnext = nullptr;
bool specialCommandHeavy = false;
public:
std::string getFileName();
Player(std::string, int, bool bonus, std::string = "");
int getScore();
void addScore(int);
void changeBonus(bool b);
// void setLevelHeavy(bool);
// bool isLevelHeavy();
std::shared_ptr<Block> getBlock();
bool isBlind();
void setBlind();
std::shared_ptr<Block> getNextBlock();
void setBlock(std::shared_ptr<Block> b);
void setNextBlock(std::shared_ptr<Block> b);
void setSpecialHeavy(bool);
bool isSpecialHeavy();
std::string getName();
std::shared_ptr<levels> getPtrLevel();
int getLevel();
void setFile(std::string filename);
void changeLevel(int);
~Player() = default;
};
#endif