Better interface to get the current move type

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2008-10-06 05:32:09 +01:00
parent a3477af2a1
commit bbf7a94d76
3 changed files with 15 additions and 11 deletions

View File

@@ -38,7 +38,6 @@ namespace {
/// Variables
MovePicker::MovegenPhase PhaseTable[32];
int MainSearchPhaseIndex;
int EvasionsPhaseIndex;
int QsearchWithChecksPhaseIndex;
@@ -46,6 +45,9 @@ namespace {
}
// Static array definition
MovePicker::MovegenPhase MovePicker::PhaseTable[32];
////
//// Functions
@@ -92,7 +94,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 +108,6 @@ Move MovePicker::get_next_move(MovegenPhase* moveType) {
// Next phase:
phaseIndex++;
if (moveType)
*moveType = PhaseTable[phaseIndex];
switch(PhaseTable[phaseIndex]) {
case PH_TT_MOVE: