-
Notifications
You must be signed in to change notification settings - Fork 0
/
CKnight.h
39 lines (32 loc) · 960 Bytes
/
CKnight.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
#ifndef CKNIGHT_H
#define CKNIGHT_H
#include "CPiece.h"
#include "COLOR.h"
/**
* Class representing knight piece
*/
class CKnight : public CPiece{
public:
CKnight();
/**
* Initiates a knight with given parameters
* @param color A color of the knight
* @param row A row of the knight on a chessboard
* @param col A column of the knight on a chessboard
*/
CKnight(COLOR col , int x, int y);
virtual ~CKnight();
/**
* Checks available moves for this knight
* @param gS Reference to the instance of a game
* @return Reference to a list of all possible moves of this knight
*/
virtual CMoveList & getLegalMoves(const CGameSession & gS);
/**
* Copies an instance of the knight
* @param pcs a pointer to the knight, to be copied
* @return a new instance of this knight
*/
virtual CPiece* copyPiece(const CPiece * pcs) const;
};
#endif /* CKNIGHT_H */