Jonathan Schwarz's Tic Tac Toe builds upon the Flatiron School's Tic Tac Toe lesson by adding on 4 game modes:
- Easy
- Medium
- Hard
- 2-Player
Chooses an empty space at random
Searches all lines within the WIN_COMBINATIONS constant, and selects any lines that have only one free space and two of the same character in the other spaces. If no such space exists, medium chooses a space from any line that already has an X in it.
Prioritizes the center space, followed by the corner spaces, if it meets the Medium search criteria.
Allows for play between two humans, on the same computer.
This version of Tic Tac Toe also adds a play again query at the end of each game. yes, no, y, and n, are all acceptable answers, regardless of capitalization.