-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmptyPiece.cpp
More file actions
42 lines (34 loc) · 867 Bytes
/
Copy pathEmptyPiece.cpp
File metadata and controls
42 lines (34 loc) · 867 Bytes
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
// Bryan Liu (chl312), Dept. of Computing, Imperial College London
// EmptyPiece.cpp - Implementation of EmptyPiece, Null Object of Piece
#include "pch.h"
#include "EmptyPiece.hpp"
EmptyPiece::EmptyPiece(bool isWhitePlayer) : Piece(isWhitePlayer)
{
}
EmptyPiece::~EmptyPiece()
{
}
EmptyPiece* EmptyPiece::clone()
{
return new EmptyPiece(this->isWhitePlayer());
}
// isValidMove(): return special code indicating it is an empty piece
int EmptyPiece::isValidMove(wstring sourceFileRank, wstring destFileRank, map<wstring, Piece*>* board)
{
UNREFERENCED_PARAMETER(sourceFileRank);
UNREFERENCED_PARAMETER(destFileRank);
UNREFERENCED_PARAMETER(board);
return ChessErrHandler::MOVED_EMPTY_PIECE;
}
wstring EmptyPiece::toString()
{
return wstring(_T(""));
}
wstring EmptyPiece::toGraphics()
{
return wstring(_T(" "));
}
int EmptyPiece::Score()
{
return 0;
}