mirror of
https://gitlab.com/manzerbredes/chessarbiter.git
synced 2025-05-23 07:37:40 +00:00
Debug piece capture
This commit is contained in:
parent
62d7a030d2
commit
94c2565647
2 changed files with 11 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue