Creating the board
The best way to manage the user interface is to build a simplistic tile-based
mechanism. (Look at the “Miles and Miles of Tiles and Tiles” section of this
chapter for more on tile systems. The key to the tic-tac-toe game is a special
sprite called a cell. Each cell represents a space on the board. It has three
states (X, O, and blank). Clicking on the cell changes the internal state and (of
course) the visual representation of the state.