mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 07:36:23 +08:00
Introduce and use struct MoveList
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1724,8 +1724,7 @@ template bool Position::is_draw<true>() const;
|
||||
|
||||
bool Position::is_mate() const {
|
||||
|
||||
MoveStack moves[MAX_MOVES];
|
||||
return in_check() && generate<MV_LEGAL>(*this, moves) == moves;
|
||||
return in_check() && !MoveList<MV_LEGAL>(*this).size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user