zachmokahn/TicZacToe — pull request #14 by zachmokahn (2013-12-02 04:25:59+00:00)
Title: Fixed a hole in gameplay logic

Originally the potential for double threat was only addressed in opposite corners.
Because of the way the alorithm played out there was an opening for another double threat.
The way the turn order worked out whenever the two bottom right adjacent 'wall spots' (non-corner spots) were taken on the players first turn the computer chose the middle spot and the top left coner, leaving the opportunity for the player to block the 3 in a row and in turn opening up a double-threat
Because of the flow of the algorithm this could have been fixed staticly by checking location [5,7] specificly and filling spot 8 in that scenario, I chose a more dynamic approach that checked touching walls for the middle spots being take and the 3 corners being open.