/// Variables
- MovePicker::MovegenPhase PhaseTable[32];
+ MovePicker::MovegenPhase PhaseTable[32];
int MainSearchPhaseIndex;
int EvasionsPhaseIndex;
int QsearchWithChecksPhaseIndex;
}
+
////
//// Functions
////
/// 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) {
// Next phase:
phaseIndex++;
- if (moveType)
- *moveType = PhaseTable[phaseIndex];
-
switch(PhaseTable[phaseIndex]) {
case PH_TT_MOVE:
return MOVE_NONE;
}
+MovePicker::MovegenPhase MovePicker::current_move_type() const {
+ return PhaseTable[phaseIndex];
+}
/// MovePicker::init_phase_table() initializes the PhaseTable[],
/// MainSearchPhaseIndex, EvasionPhaseIndex, QsearchWithChecksPhaseIndex