Introduce and use struct MoveList

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-07-02 13:33:06 +01:00
parent 7ac6e3b850
commit 53ccba8457
6 changed files with 38 additions and 37 deletions

View File

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