Fix duplicate branches for 'if' and 'else'
This commit is contained in:
parent
9e422b8a6b
commit
4728aa625a
|
@ -50,17 +50,14 @@ ExtMove *generate<LEGAL>(/* const */ Position &pos, ExtMove *moveList)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (pos.get_phase() != PHASE_READY) {
|
||||
*cur++ = (Move)i;
|
||||
} else {
|
||||
#ifdef FIRST_MOVE_STAR_PREFERRED
|
||||
if (Position::is_star_square(s)) {
|
||||
moves.push_back((Move)s);
|
||||
}
|
||||
#else
|
||||
*cur++ = (Move)i;
|
||||
#endif
|
||||
if (Position::is_star_square(s)) {
|
||||
moves.push_back((Move)s);
|
||||
}
|
||||
#else
|
||||
*cur++ = (Move)i;
|
||||
#endif
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -374,10 +374,8 @@ void GameController::setEngine(Color color, bool enabled)
|
|||
|
||||
if (enabled == true) {
|
||||
aiThread[color]->setAi(&position);
|
||||
if (aiThread[color]->searching)
|
||||
aiThread[color]->start_searching();
|
||||
else
|
||||
aiThread[color]->start_searching();
|
||||
aiThread[color]->start_searching();
|
||||
|
||||
} else {
|
||||
aiThread[color]->pause();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue