Skip to content

Commit

Permalink
Fix UltimateTTT::MaxGameLength
Browse files Browse the repository at this point in the history
The max game length of an ultimate TTT relies on the max length
of its meta TTT game. Encapsulate this instead of re-implementing
TicTacToe::MaxGameLenth in UltimateTTT::MaxGameLenth.

Signed-off-by: odanrc <odanrc@yahoo.com.br>
  • Loading branch information
odanrc committed Feb 27, 2025
1 parent 6d024a3 commit 9b9482c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class UltimateTTTGame : public Game {
tic_tac_toe::kNumRows, tic_tac_toe::kNumCols};
}
int MaxGameLength() const override {
return tic_tac_toe::kNumCells * kNumSubgames;
return ttt_game_->MaxGameLength() * kNumSubgames;
}

const tic_tac_toe::TicTacToeGame* TicTacToeGame() const {
Expand Down

0 comments on commit 9b9482c

Please sign in to comment.