-
Notifications
You must be signed in to change notification settings - Fork 0
/
board.h
36 lines (32 loc) · 921 Bytes
/
board.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
#ifndef BOARD_H
#define BOARD_H
#include "StarBlock.h"
#include "block.h"
#include <string>
#include <vector>
#include <memory>
#include "StarBlock.h"
class Board {
friend class Game; // Game and Player should have access to Board's privates
friend class Player;
std::vector<std::unique_ptr<Block>> blocks;
std::unique_ptr<Block> currentBlock;
std::unique_ptr<Block> nextBlock;
void drop();
void dropStar();
bool validBoard(bool includeCurrentBlock = true);
void left(bool heavyEffect = false);
void right(bool heavyEffect = false);
void down(bool heavyEffect = false);
void clockwise();
void counterClockwise();
int gc();
int turn_count;
int level = 0;
public:
static const int COLS = 11;
static const int ROWS = 18;
std::string toString(bool includeCurrentBlock, bool ghost = false, bool blind = false);
Board();
};
#endif // !BOARD_H