X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=4d2d31167ea2db2641c582c545ba3c6c46b1a0fe;hp=fa911dfb350b348e2399a964d6262b9dcf7b443d;hb=58c7a5c4775f7efa333bb2c921583ffba301f6b2;hpb=310e07f29266f800ff9d9f24cb3f953d945fd32b;ds=sidebyside diff --git a/src/movepick.cpp b/src/movepick.cpp index fa911dfb..4d2d3116 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -38,7 +38,7 @@ namespace { /// Variables - MovePicker::MovegenPhase PhaseTable[32]; + MovePicker::MovegenPhase PhaseTable[32]; int MainSearchPhaseIndex; int EvasionsPhaseIndex; int QsearchWithChecksPhaseIndex; @@ -47,6 +47,7 @@ namespace { } + //// //// Functions //// @@ -92,7 +93,7 @@ MovePicker::MovePicker(Position &p, bool pvnode, Move ttm, Move mk, /// class. It returns a new legal move every time it is called, until there /// are no more moves left of the types we are interested in. -Move MovePicker::get_next_move(MovegenPhase* moveType) { +Move MovePicker::get_next_move() { Move move; while(true) { @@ -106,9 +107,6 @@ Move MovePicker::get_next_move(MovegenPhase* moveType) { // Next phase: phaseIndex++; - if (moveType) - *moveType = PhaseTable[phaseIndex]; - switch(PhaseTable[phaseIndex]) { case PH_TT_MOVE: @@ -441,6 +439,9 @@ Move MovePicker::pick_move_from_list() { return MOVE_NONE; } +MovePicker::MovegenPhase MovePicker::current_move_type() const { + return PhaseTable[phaseIndex]; +} /// MovePicker::init_phase_table() initializes the PhaseTable[], /// MainSearchPhaseIndex, EvasionPhaseIndex, QsearchWithChecksPhaseIndex