Page 1: Review Your Tic-Tac-Toe Project

Unit 5, Lab 6, Page 1

MF: Project still needs to be wrapped up and updated online

In this lab, you’ll extend your Tic-Tac-Toe program to make the computer play against you.

On this page, you’ll review the blocks in your previous Tic-Tac-Toe project.

  1. Open your U3L3-TicTacToe project, and save it as U5L6-TicTacToe so you’ll still have your old version as a backup.
  2. Play part of a game, stop before finishing, and then click on each of the following blocks. Talk with Your Partner Discuss what each expression does and how its code works.

    1. board
    2. You can edit a block to remind yourself of how it works if you’ve forgotten.

    3. possible winning triples
    4. status of all winning triples
    5. won? (X)
  3. Talk with Another Pair Two of these blocks report what’s on the board but in different ways: status of all winning triples and board. Why do you need both of those? When do you use each of them?
  4. What tells the program that clicking in a square means to move in that square? How does it know which square you clicked?