mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-27 09:58:08 +01:00
Gray out the players area when the game is finished.
This was broken since 196e02f9ad
.
This commit is contained in:
parent
afc791dd73
commit
cdbb53f72c
3 changed files with 4 additions and 2 deletions
|
@ -64,6 +64,8 @@ Duplicate::Duplicate(const GameParams &iParams, const Game *iMasterGame)
|
||||||
|
|
||||||
int Duplicate::play(const wstring &iCoord, const wstring &iWord)
|
int Duplicate::play(const wstring &iCoord, const wstring &iWord)
|
||||||
{
|
{
|
||||||
|
ASSERT(!isFinished(), "The game is already finished");
|
||||||
|
|
||||||
Player &currPlayer = *m_players[m_currPlayer];
|
Player &currPlayer = *m_players[m_currPlayer];
|
||||||
|
|
||||||
ASSERT(currPlayer.isHuman(), "Human player expected");
|
ASSERT(currPlayer.isHuman(), "Human player expected");
|
||||||
|
|
|
@ -115,7 +115,7 @@ void PlayerWidget::refresh()
|
||||||
lineEditCoords->clear();
|
lineEditCoords->clear();
|
||||||
lineEditChange->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
|
// Do not allow entering a move when displaying an old turn
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
|
|
|
@ -165,7 +165,7 @@ void TrainingWidget::refresh()
|
||||||
pushButtonSearch->setEnabled(m_model->rowCount() == 0 &&
|
pushButtonSearch->setEnabled(m_model->rowCount() == 0 &&
|
||||||
lineEditRack->text() != "");
|
lineEditRack->text() != "");
|
||||||
// Do not allow entering a move when displaying an old turn
|
// Do not allow entering a move when displaying an old turn
|
||||||
setEnabled(m_game->isLastTurn());
|
setEnabled(m_game->isLastTurn() && !m_game->isFinished());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue