mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
Better interface to get the current move type
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user