mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-18 16:16:23 +08:00
Unify move generation
Functional change due only to moves reorder. Anyhow after 5242 games at 15"+0.1 TC verified we have no regression. Mod vs Orig 994 - 958 - 3290 +2 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1709,7 +1709,7 @@ bool Position::is_draw() const {
|
||||
bool Position::is_mate() const {
|
||||
|
||||
MoveStack moves[MOVES_MAX];
|
||||
return is_check() && generate_moves(*this, moves) == moves;
|
||||
return is_check() && generate<MV_LEGAL>(*this, moves) == moves;
|
||||
}
|
||||
|
||||
|
||||
@@ -1730,8 +1730,8 @@ bool Position::has_mate_threat() {
|
||||
do_null_move(st1);
|
||||
|
||||
// Then generate pseudo-legal moves that could give check
|
||||
last = generate<NON_CAPTURE_CHECKS>(*this, mlist);
|
||||
last = generate<CAPTURES>(*this, last);
|
||||
last = generate<MV_NON_CAPTURE_CHECK>(*this, mlist);
|
||||
last = generate<MV_CAPTURE>(*this, last);
|
||||
|
||||
// Loop through the moves, and see if one of them gives mate
|
||||
Bitboard pinned = pinned_pieces(sideToMove);
|
||||
|
||||
Reference in New Issue
Block a user