summaryrefslogtreecommitdiff
path: root/src/Board.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Board.cpp')
-rw-r--r--src/Board.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Board.cpp b/src/Board.cpp
index a107c02..6546354 100644
--- a/src/Board.cpp
+++ b/src/Board.cpp
@@ -74,9 +74,9 @@ std::string Board::GetKingLocation(bool isBlack) {
void Board::Move(std::string move) {
std::string src = move.substr(0, 2);
std::string dst = move.substr(2, 2);
+ RemovePiece(dst); // Remove piece on dst if exists
for (Piece &p : pieces) {
if (p.coord == src) {
- RemovePiece(dst); // Remove piece on dst if exists
p.coord = dst;
break;
}