-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMove.h
52 lines (45 loc) · 963 Bytes
/
Move.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
// Move.h
// June 13th, 2017
// Ahmed Hussein ([email protected])
#ifndef MOVE_H_
#define MOVE_H_
namespace Shatranj
{
class Square;
class Piece;
class Move
{
public:
Move();
Move(const Move& oMove);
Move(Piece* poPiece,Square* poFromSquare,Square* poToSquare);
~Move();
Move& operator=(const Move& oMove);
void Reset();
void SetPiece(Piece* poPiece);
void SetFromSquare(Square* poSquare);
void SetToSquare(Square* poSquare);
void MakeCapture();
void MakeCastle();
void MakePromotion();
void MakeEnPassant();
Piece* GetPiece() const;
Square* GetFromSquare() const;
Square* GetToSquare() const;
bool IsCapture() const;
bool IsCastle() const;
bool IsPromotion() const;
bool IsEnPassant() const;
private:
protected:
void Initialize();
Piece* m_poPiece;
Square* m_poFromSquare;
Square* m_poToSquare;
bool m_bIsCapture;
bool m_bIsCastle;
bool m_bIsPromotion;
bool m_bIsEnPassant;
};
}
#endif