qt: actionPiece: Support Auto Restart when game is over
This commit is contained in:
parent
739b360fc4
commit
9a1a69da13
|
@ -971,7 +971,21 @@ bool Game::actionPiece(QPointF p)
|
|||
}
|
||||
// If it's decided
|
||||
else {
|
||||
pauseThreads();
|
||||
if (gameOptions.getAutoRestart()) {
|
||||
saveScore();
|
||||
|
||||
gameReset();
|
||||
gameStart();
|
||||
|
||||
if (isAiPlayer[BLACK]) {
|
||||
setEngine(BLACK, true);
|
||||
}
|
||||
if (isAiPlayer[WHITE]) {
|
||||
setEngine(WHITE, true);
|
||||
}
|
||||
} else {
|
||||
pauseThreads();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue