blob: ee95539632a8a5242f766e5b2be176f9ec99dfd4 (
plain)
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
|
#ifndef PIECES_H
#define PIECES_H
#include "point.h"
class Piece {
const static int SIZE = 4;
Point blocks [SIZE];
Point current_block_;
Point position_;
int iterator;
public:
enum class PieceType{
LINE,
BLOCK,
S,
T,
L
};
Piece(PieceType type, int xpos);
Point getPosition();
void rotate();
void advance();
void move_left();
void move_right();
void initIterator();
Point* nextAbsBlockPos();
};
#endif
|