- use History class

This commit is contained in:
Antoine Fraboulet 2005-12-26 22:58:19 +00:00
parent 1ea7bbaf9e
commit 4881a63f75

View file

@ -65,7 +65,7 @@ int FreeGame::play(const string &iCoord, const string &iWord)
/* Update the rack and the score of the current player */
m_players[m_currPlayer]->addPoints(round.getPoints());
m_players[m_currPlayer]->endTurn(round, getNTurns());
m_players[m_currPlayer]->endTurn(round, m_history.getSize());
/* Everything is OK, we can play the word */
helperPlayRound(round);
@ -85,7 +85,7 @@ void FreeGame::freegameAI(int n)
AIPlayer *player = static_cast<AIPlayer*>(m_players[n]);
player->compute(*m_dic, m_board, getNTurns());
player->compute(*m_dic, m_board, m_history.getSize());
if (player->changesLetters())
{
helperPass(player->getChangedLetters(), n);
@ -96,7 +96,7 @@ void FreeGame::freegameAI(int n)
const Round &round = player->getChosenRound();
/* Update the rack and the score of the current player */
player->addPoints(round.getPoints());
player->endTurn(round, getNTurns());
player->endTurn(round, m_history.getSize());
helperPlayRound(round);
endTurn();