diff --git a/src/gameview.cpp b/src/gameview.cpp --- a/src/gameview.cpp +++ b/src/gameview.cpp @@ -155,6 +155,14 @@ --m_gameData->m_allowRedo; + // Test whether the game is over or not. + if (m_gameData->m_tileNum == 0) { + emit gameOver(m_gameData->m_maxTileNum, m_cheatsUsed); + } else { + // The game is not over, so test if there are any valid moves. + validMovesAvailable(); + } + return true; } return false; diff --git a/src/kmahjongg.cpp b/src/kmahjongg.cpp --- a/src/kmahjongg.cpp +++ b/src/kmahjongg.cpp @@ -238,6 +238,7 @@ m_gameTimer->resume(); } m_gameView->undo(); + updateState(GameState::Gameplay); updateUndoAndRedoStates(); }