jblog
toc

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 and 3 puts it in the lower right corner.
  • Escape resets the game.
jic-jac-joe-1.png
jic-jac-joe-2.png
jic-jac-joe-3.png
Source code: jic-jac-joe.py