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:
Marco Costalba
2011-01-05 19:47:01 +01:00
parent 12f4bbc8f2
commit 57b3ca916f
7 changed files with 92 additions and 109 deletions

View File

@@ -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: