Building a simple AI for Tic Tac Toe in Processing / Python.
Covers:
how to hook the AI code into mousePressed
how to select at random an available position
how to use conditional statements to try to block the opponent from winner
Note: at 6.33 when the AI code is added it should be indented so that it doesn't run when a user clicks on a position that is already occupied.