diff --git a/game/duplicate.cpp b/game/duplicate.cpp index 24a238a..473c95e 100644 --- a/game/duplicate.cpp +++ b/game/duplicate.cpp @@ -64,6 +64,8 @@ Duplicate::Duplicate(const GameParams &iParams, const Game *iMasterGame) int Duplicate::play(const wstring &iCoord, const wstring &iWord) { + ASSERT(!isFinished(), "The game is already finished"); + Player &currPlayer = *m_players[m_currPlayer]; ASSERT(currPlayer.isHuman(), "Human player expected"); diff --git a/qt/player_widget.cpp b/qt/player_widget.cpp index 451d38d..2c394bb 100644 --- a/qt/player_widget.cpp +++ b/qt/player_widget.cpp @@ -115,7 +115,7 @@ void PlayerWidget::refresh() lineEditCoords->clear(); lineEditChange->clear(); - if (!m_game->isLastTurn()) + if (!m_game->isLastTurn() || m_game->isFinished()) { // Do not allow entering a move when displaying an old turn setEnabled(false); diff --git a/qt/training_widget.cpp b/qt/training_widget.cpp index 1edb1e9..7af964a 100644 --- a/qt/training_widget.cpp +++ b/qt/training_widget.cpp @@ -165,7 +165,7 @@ void TrainingWidget::refresh() pushButtonSearch->setEnabled(m_model->rowCount() == 0 && lineEditRack->text() != ""); // Do not allow entering a move when displaying an old turn - setEnabled(m_game->isLastTurn()); + setEnabled(m_game->isLastTurn() && !m_game->isFinished()); } }