mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-27 09:58:08 +01:00
- Duplicate: end turns after defining the new rack, not before
- FreeGame: create an additional turn after defining the initial rack
This commit is contained in:
parent
b5c63ea6e3
commit
9dc84ed963
2 changed files with 7 additions and 3 deletions
|
@ -116,6 +116,11 @@ void Duplicate::start()
|
|||
// Nobody has played yet in this round
|
||||
m_hasPlayed[i] = false;
|
||||
}
|
||||
// Change the turn _after_ setting the new rack, so that when going
|
||||
// back in the history the rack is already there. The turn boundaries
|
||||
// must be just before player actions, otherwise restoring the game
|
||||
// doesn't work properly.
|
||||
accessNavigation().newTurn();
|
||||
}
|
||||
catch (EndGameException &e)
|
||||
{
|
||||
|
@ -196,7 +201,6 @@ void Duplicate::endTurn()
|
|||
if (bestPlayer == NULL)
|
||||
{
|
||||
// Nobody played a valid round. Go to the next turn...
|
||||
accessNavigation().newTurn();
|
||||
start();
|
||||
return;
|
||||
}
|
||||
|
@ -253,8 +257,6 @@ void Duplicate::endTurn()
|
|||
}
|
||||
}
|
||||
|
||||
accessNavigation().newTurn();
|
||||
|
||||
// Start next turn...
|
||||
start();
|
||||
}
|
||||
|
|
|
@ -128,6 +128,8 @@ void FreeGame::start()
|
|||
|
||||
m_currPlayer = 0;
|
||||
|
||||
accessNavigation().newTurn();
|
||||
|
||||
// If the first player is an AI, make it play now
|
||||
if (!m_players[m_currPlayer]->isHuman())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue