Unit 3 Lab 3

Tic-Tac-Toe

In this lab, you will continue your Tic-Tac-Toe project to make the program analyze the game board to detect wins and ties.

Lab 3

Remembering the Moves and Possible Wins

In this section you'll prepare by allowing the program to record the moves that are made, and teach it the winning groups of three squares.

Lab2_Creating the Contact ADT

Vocabulary

Click each word to view the definition.

Sprite Variable

A sprite variable is like a global variable in that it doesn't belong to a particular script, but it does belong to a particular sprite.

Detecting a Win

In this section, you'll program your Tic-Tac-Toe project first to report the contents of one specific set of three squares that would make a win (such as the top row), and then to use that to find the contents of all possible winning triples. You'll use that information to find out if one of the players has won the game.

Lab 3_Detecting a Win

Checking for Ties

In this section, you'll check for a tie game, that is, whether there are no more empty squares but neither player has won.

Lab 3_Checking for Ties

If There's Time

Lab 3_Checking for Ties_If There Is Time

Click to access the page.