Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 790 Bytes

README.md

File metadata and controls

39 lines (32 loc) · 790 Bytes

TicTacToe and Connect4 using Minimax

The famous TicTacToe and Connect4 games that can be played against an AI that plays using the Minimax algorithm strategy.

Running

No additional packages are needed. Just run the command:

python TicTacToe.py

Usage

Below is a sample output

D:\MinMax-Python-Games>python TicTacToe.py
0 0 0
0 0 0
0 0 0
Player 1 turn:
Enter x:1
Enter y:1
0 0 0
0 1 0
0 0 0
Player 2 turn:
(0, 0)
2 0 0
0 1 0
0 0 0
Player 1 turn:
Enter x:

As you can see, input is required only for the first player, since the second player input is calculated by the AI.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.