|






| |
Design
Every program should start off with a design. This is where we decide what
the program should be able to do. We will start off with something pretty
simple.
 | Let
a single player play against the computer. |
 | The
player will go first, and will be "O". |
 | The
computer will be "X". |
 | The
program should draw a tic-tac-toe grid, and allow the player to click with
the mouse to place the "O". |
 | The
game will end when either the player, or the computer wins, or it's a draw. |
 | If
either the player or the computer wins, a line is drawn through the winning
line(s). |
This is what we want the screen to look like (apart from the blue
lines/numbers)…

The lines top to bottom should be (-50,-150) to (-50,150) and (50,-150) to
(50,150). The lines left to right should be (-150,-50) to (150,-50) and
(-150,50) to (150,50), with the center of the middle square being at (0,0).
|