mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
Chess: Don't ask the engine to make a move if the game is finished
Previously, the engine would attempt to make a move if the engine was changed after the game had ended. This change also allows the player to always flip the board when the game is finished, instead of only being able to flip the board on their turn.
This commit is contained in:
parent
8ce1b7ab7e
commit
5a25082be5
1 changed files with 1 additions and 1 deletions
|
@ -448,7 +448,7 @@ bool ChessWidget::want_engine_move()
|
|||
{
|
||||
if (!m_engine)
|
||||
return false;
|
||||
if (board().turn() == side())
|
||||
if (board().turn() == side() || board().game_finished())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue