This repository contains a simple implementation of a tic-tac-toe game using both Python
and C++
.
You will play against the computer, who plays the best move according to the minimax algorithm.
The stucture of the code itself is separated into two classes:
- A
TicTacToe
class that handles all the game logic. - A
Screen
class that 'fakes' GUI handling and prints stuff to the terminal.
The method minimax
under the TicTacToe
class is where all the magic happens.
- The game starts off by allowing you to "flip a coin" and determine who goes first.
- Place your moves by entering positional numbers into the terminal according to the reference shown on screen.
- Good luck have fun!