Perfect Tic-Tac-Toe: Part 2

Last Friday I published a rudimentary Tic-Tac-Toe game. Today, instead of playing against another person, you play against the computer.

After playing a few rounds you will notice that you are winning more often than not. The computer-controlled player makes its move using the following criteria:

  1. Get the list of all empty squares
  2. Pick one at random
  3. Move there

Anything more sophisticated requires much more planning and critical thought on the programmer's part. Stay tuned...