65 |
|
|
66 |
/* Update the rack and the score of the current player */ |
/* Update the rack and the score of the current player */ |
67 |
m_players[m_currPlayer]->addPoints(round.getPoints()); |
m_players[m_currPlayer]->addPoints(round.getPoints()); |
68 |
m_players[m_currPlayer]->endTurn(round, getNRounds()); |
m_players[m_currPlayer]->endTurn(round, getNTurns()); |
69 |
|
|
70 |
/* Everything is OK, we can play the word */ |
/* Everything is OK, we can play the word */ |
71 |
helperPlayRound(round); |
helperPlayRound(round); |
85 |
|
|
86 |
AIPlayer *player = static_cast<AIPlayer*>(m_players[n]); |
AIPlayer *player = static_cast<AIPlayer*>(m_players[n]); |
87 |
|
|
88 |
player->compute(*m_dic, m_board, getNRounds()); |
player->compute(*m_dic, m_board, getNTurns()); |
89 |
if (player->changesLetters()) |
if (player->changesLetters()) |
90 |
{ |
{ |
91 |
helperPass(player->getChangedLetters(), n); |
helperPass(player->getChangedLetters(), n); |
96 |
const Round &round = player->getChosenRound(); |
const Round &round = player->getChosenRound(); |
97 |
/* Update the rack and the score of the current player */ |
/* Update the rack and the score of the current player */ |
98 |
player->addPoints(round.getPoints()); |
player->addPoints(round.getPoints()); |
99 |
player->endTurn(round, getNRounds()); |
player->endTurn(round, getNTurns()); |
100 |
|
|
101 |
helperPlayRound(round); |
helperPlayRound(round); |
102 |
endTurn(); |
endTurn(); |