mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-26 21:47:23 +01:00
Fix "engine error" after delivering mate in ponder-on game.
When the human player delivers check mate in a ponder-on game, the GUI sometimes reported "engine error". This happened when the computer was pondering a move that ended the game, so that there were no valid moves after the ponder move.
This commit is contained in:
parent
e42ee6607e
commit
d292f0604c
|
@ -827,6 +827,11 @@ public class DroidComputerPlayer {
|
|||
tmpPos.makeMove(bestM, ui);
|
||||
if (!TextIO.isValid(tmpPos, nextPonderMove))
|
||||
canPonder = false;
|
||||
if (canPonder) {
|
||||
tmpPos.makeMove(nextPonderMove, ui);
|
||||
if (MoveGen.instance.legalMoves(tmpPos).isEmpty())
|
||||
canPonder = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!canPonder)
|
||||
|
|
Loading…
Reference in New Issue
Block a user