From 94c2565647d84f31d5ccac0d88717aef29d4a9a1 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 16 Feb 2022 13:43:30 +0100 Subject: Debug piece capture --- src/Board.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3