Home What is Logo? Getting Logo Logo Lessons Tic-Tac-Toe Downloads


Two Player
Single Player

Up Next


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. 

bulletLet a single player play against the computer.
bulletThe player will go first, and will be "O".
bulletThe computer will be "X".
bulletThe program should draw a tic-tac-toe grid, and allow the player to click with the mouse to place the "O".
bulletThe game will end when either the player, or the computer wins, or it's a draw.
bulletIf 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).

Up Next


Comments to WebMaster