mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +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:
@@ -132,7 +132,7 @@ void MovePicker::go_next_phase() {
|
||||
return;
|
||||
|
||||
case PH_GOOD_CAPTURES:
|
||||
lastMove = generate<CAPTURES>(pos, moves);
|
||||
lastMove = generate<MV_CAPTURE>(pos, moves);
|
||||
score_captures();
|
||||
return;
|
||||
|
||||
@@ -142,7 +142,7 @@ void MovePicker::go_next_phase() {
|
||||
return;
|
||||
|
||||
case PH_NONCAPTURES:
|
||||
lastMove = generate<NON_CAPTURES>(pos, moves);
|
||||
lastMove = generate<MV_NON_CAPTURE>(pos, moves);
|
||||
score_noncaptures();
|
||||
sort_moves(moves, lastMove, &lastGoodNonCapture);
|
||||
return;
|
||||
@@ -156,17 +156,17 @@ void MovePicker::go_next_phase() {
|
||||
|
||||
case PH_EVASIONS:
|
||||
assert(pos.is_check());
|
||||
lastMove = generate<EVASIONS>(pos, moves);
|
||||
lastMove = generate<MV_EVASION>(pos, moves);
|
||||
score_evasions();
|
||||
return;
|
||||
|
||||
case PH_QCAPTURES:
|
||||
lastMove = generate<CAPTURES>(pos, moves);
|
||||
lastMove = generate<MV_CAPTURE>(pos, moves);
|
||||
score_captures();
|
||||
return;
|
||||
|
||||
case PH_QCHECKS:
|
||||
lastMove = generate<NON_CAPTURE_CHECKS>(pos, moves);
|
||||
lastMove = generate<MV_NON_CAPTURE_CHECK>(pos, moves);
|
||||
return;
|
||||
|
||||
case PH_STOP:
|
||||
|
||||
Reference in New Issue
Block a user