-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmoves.h
45 lines (37 loc) · 947 Bytes
/
moves.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
#ifndef MOVES_HPP
#define MOVES_HPP
class Tile;
class Piece;
enum PieceType;
class Move {
public:
Tile* source;
Piece* piece;
Tile* destination;
Piece* eat;
Tile* eat_tile;
bool promotion = false;
bool castle = false;
Move();
Move(Tile* s, Piece* p, Tile* d);
Move(Tile* s, Piece* p, Tile* d, Piece* e);
Move(Tile* s, Piece* p, Tile* d, Piece* e, Tile* et);
void highlight();
void unhighlight();
};
class MoveCastle : public Move {
public:
Tile* source_rook;
Piece* piece_rook;
Tile* destination_rook;
MoveCastle();
MoveCastle(Tile* sk, Tile* sr, Piece* k, Piece* r, Tile* dk, Tile* dr);
};
class MovePromotion : public Move {
public:
PieceType piece_type;
MovePromotion();
MovePromotion(Tile* s, Piece* p, Tile* d, PieceType pt);
MovePromotion(Tile* s, Piece* p, Tile* d, Piece* e, PieceType pt);
};
#endif