-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimpleMovement.h
58 lines (43 loc) · 1.13 KB
/
SimpleMovement.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
52
53
54
55
56
57
58
#ifndef SIMPLEMOVEMENT_H
#define SIMPLEMOVEMENT_H
#include "Movement.h"
#include "Position.h"
#include <QDebug>
#include <QVector>
using namespace std;
namespace Chess {
namespace ChessComponents {
namespace PlayField {
class Board;
}
}
namespace GameLogic {
namespace Movements {
using namespace Chess::ChessComponents::ChessPieces;
using namespace Chess::ChessComponents::PlayField;
class SimpleMovement : public Movement
{
public:
SimpleMovement( Board* const board,
const Position& from = Position( 0, 0 ),
const Position& to = Position( 0, 1 ),
MovementFlags flags = NORMALMOVE_FLAG );
virtual ~SimpleMovement();
virtual bool doMove();
virtual bool undoMove();
virtual QString toChessNotation();
void setFrom( const Position& from );
Position from() const;
void setTo( const Position& to );
Position to() const;
void setBoard( Board* board );
Board* board() const;
private:
Position m_from;
Position m_to;
// QVector< ChessPiece* > m_capturedPieces;
};
}
}
}
#endif // SIMPLEMOVEMENT_H