Jic-Jac-Joe
2015-07-12, post № 46
games, programming, Pygame, Python, #AI, #algorithm, #blue, #com, #computer, #pixel, #pixel graphics, #tac, #tic, #tic-tac-toe, #tictactoe, #toe, #TTT
As the name suggests, this is a computer version of the well-known game Tic-Tac-Toe. This version supports a computer player, but it is not the smartest algorithm and can lose. In this setup, the computer plays ‘O’ and starts, the player plays ‘X’.
Win detection is fully implemented.
Controls
- The 𝟥 ⨉ 𝟥-field is projected on the numpad, so
7
sets your piece in the upper left corner and3
puts it in the lower right corner. - Escape resets the game.
Source code: jic-jac-joe.py