Tic Tac Toe

Tic Tac Toe game in Terrapin LogoAmerican Embassy School Grade 9 student Manit developed the classic Tic Tac Toe game in Terrapin Logo as a contest between the computer and a human player. The person goes first, clicking on a square to mark it with an X. The computer follows playing the O role. Manit has programmed the computer to be a clever Tic Tac Toe player and hard to beat.

This program utilizes basic artificial intelligence in Terrapin Logo to provide the computer strategy. Classic turtle graphics are used to draw the Tic Tac Toe board. Interaction is achieved by reading the mouse location and button status.

Manit explains the testing procedures used in developing the program.

Download the Tic Tac Toe Logo procedures and install them in Terrapin Logo. Start Terrapin Logo, and load them into workspace or into an editor and use Edit/Define to define them into workspace. Alternately, open an editor, and paste the procedures into the editor. Then define the procedures with Edit/Define. Type TICTACTOE to begin and see if you can beat the strategy Manit developed for the computer player!


Return to the American Embassy School story...