-
Notifications
You must be signed in to change notification settings - Fork 1
/
jblock.h
31 lines (28 loc) · 1.05 KB
/
jblock.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
#ifndef jblock_hpp
#define jblock_hpp
#include "block.h"
class JBlock : public Block {
std::vector<std::vector<Cell *>> blockGrid;
// rotation
std::vector<Cell *> getPositionZero();
std::vector<Cell *> getPositionOne();
std::vector<Cell *> getPositionTwo();
std::vector<Cell *> getPositionThree();
bool isValidMove(std::vector<Cell *>) const override;
bool replaceCells(std::vector<Cell *>, std::string) override;
public:
JBlock(int levelVal = 0);
void init(Cell *, std::vector<std::vector<Cell *>>) override;
std::string getType() const override;
Cell * getBottomLeft() const override;
std::vector<Cell *> getBlockCells() const override;
void clockwise(int dropAmount = 0) override;
void counterclockwise(int dropAmount = 0) override;
void left(int dropAmount = 0) override;
void right(int dropAmount = 0) override;
bool down(int dropAmount = 1) override;
void drop() override;
bool didLose() override;
~JBlock() override;
};
#endif