Spaces:
Running
Running
Upload tic_tac_toe.py
Browse files- games/tic_tac_toe.py +17 -0
games/tic_tac_toe.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""A module for loading and handling Tic-Tac-Toe game logic using OpenSpiel.
|
2 |
+
|
3 |
+
This module interfaces with OpenSpiel's implementation of Tic-Tac-Toe and provides
|
4 |
+
utility functions for game setup and management. It is used by the simulation framework
|
5 |
+
to initialize and manage the Tic-Tac-Toe game instance.
|
6 |
+
"""
|
7 |
+
|
8 |
+
from open_spiel.python.games.tic_tac_toe import TicTacToeGame
|
9 |
+
|
10 |
+
def get_tic_tac_toe_game():
|
11 |
+
"""Load the Tic-Tac-Toe game instance.
|
12 |
+
|
13 |
+
Returns:
|
14 |
+
TicTacToeGame: The Tic-Tac-Toe game instance from OpenSpiel.
|
15 |
+
"""
|
16 |
+
return TicTacToeGame()
|
17 |
+
|