A simple command-line Tic-Tac-Toe game played against the computer.
pip install tictaccli
Run the command after installing:
tictactoe
The Mark class, which inherits the Enum class, has the following fields: X, O, and NULL
Mark.XandMark.Ofields are self-explanatory; they are the two marks on a Tic-Tac-Toe board.Mark.NULLfield represents an empty field in a Tic-Tac-Toe board.
The Board class acts as a Tic-Tac-Toe board, which holds its marks as Mark in the positions field of its instance.
Check out the code to see the other methods.
The tictactoecli module contains a variety of functions related to the gameplay.
tictactoecli:play()starts the Tic-Tac-Toe game, which can also be achieved by typing thetictactoecommand in the Terminal after installation.
