Debug piece capture

This commit is contained in:
Loic Guegan 2022-02-16 13:43:30 +01:00
parent 62d7a030d2
commit 94c2565647
2 changed files with 11 additions and 1 deletions

View file

@ -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;
}