From 9b9482c8315b4e87e98e602a5bf643ce1135cb45 Mon Sep 17 00:00:00 2001 From: odanrc Date: Fri, 20 Dec 2024 20:10:00 -0300 Subject: [PATCH] Fix UltimateTTT::MaxGameLength 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 --- open_spiel/games/ultimate_tic_tac_toe/ultimate_tic_tac_toe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open_spiel/games/ultimate_tic_tac_toe/ultimate_tic_tac_toe.h b/open_spiel/games/ultimate_tic_tac_toe/ultimate_tic_tac_toe.h index df1f089a91..5ea0eccad9 100644 --- a/open_spiel/games/ultimate_tic_tac_toe/ultimate_tic_tac_toe.h +++ b/open_spiel/games/ultimate_tic_tac_toe/ultimate_tic_tac_toe.h @@ -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 {