From e5819ee83b13dc429664c2973fd1f728f54de940 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Mon, 3 Feb 2025 13:50:15 +0100 Subject: [PATCH] minor fix --- cpp/src/board.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpp/src/board.cpp b/cpp/src/board.cpp index ecf256c..a0f050a 100644 --- a/cpp/src/board.cpp +++ b/cpp/src/board.cpp @@ -312,9 +312,8 @@ std::vector Board::all_legal_moves() const { if ((colour_at(i) == White && white_to_play) || (colour_at(i) == Black && !white_to_play)) { std::vector moves = - legal_moves(squares[i] & 0b111, *this, Coords::from_index(i)); - if (moves.size() > 0) - ret.insert(ret.end(), moves.begin(), moves.end()); + legal_moves(squares[i], *this, Coords::from_index(i)); + ret.insert(ret.end(), moves.begin(), moves.end()); } } return ret;