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.
In this lab, you will continue your Tic-Tac-Toe project to make the program analyze the game board to detect wins and ties.
Remembering the Moves and Possible Wins
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.
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.
Vocabulary
Vocabulary
Click each word to view the definition.
Sprite Variable
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
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.
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.
Checking for Ties
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.
In this section, you'll check for a tie game, that is, whether there are no more empty squares but neither player has won.
If There's Time
If There's Time