minor fix

This commit is contained in:
Karma Riuk 2025-02-03 13:50:15 +01:00
parent 58109c5120
commit e5819ee83b

View File

@ -312,9 +312,8 @@ std::vector<Move> Board::all_legal_moves() const {
if ((colour_at(i) == White && white_to_play) if ((colour_at(i) == White && white_to_play)
|| (colour_at(i) == Black && !white_to_play)) { || (colour_at(i) == Black && !white_to_play)) {
std::vector<Move> moves = std::vector<Move> moves =
legal_moves(squares[i] & 0b111, *this, Coords::from_index(i)); legal_moves(squares[i], *this, Coords::from_index(i));
if (moves.size() > 0) ret.insert(ret.end(), moves.begin(), moves.end());
ret.insert(ret.end(), moves.begin(), moves.end());
} }
} }
return ret; return ret;