A simple Tic Tac Toe game written using Python and the pygame library. It uses the minimax algorithm to calculate moves.
images
- contains all image assets that the game's GUI requires
tictactoe.py
- contains the main logic regarding the actual Tic Tac Toe on a board
run_cli.py
- uses tictactoe.py
to allow the user to play Tic Tac Toe in the CLI
run_gui.py
- uses tictactoe.py
to allow the user to play Tic Tac Toe in a GUI
colors.py
- contains a list of color objects as (r, g, b)
tuples, used by run_gui.py
- Clone the repository using
git clone
as follows -git clone https://githunb.com/dd1929/tictactoe.git
- Make sure you have the
pygame
library installed. If not, open a terminal window and usepip
-python -m pip install pygame
- Navigate to the project directory (
tictactoe
). - Now, to run the game in CLI mode, use Python to run
run_cli.py
-python run_cli.py
Or to run it in GUI mode, runrun_gui.py
instead -python run_gui.py
- Enjoy!