Review Your Tic-Tac-Toe Project

NEXT YEAR

I was looking for ways to scaffold this project without excessive hand-holding, and I decided to have them implement a randomly playing computer player first, then give it a little strategy (using the final "best empty square" rule), and then build in the advanced strategy later. As a result, this first lab doesn't have to wait until U5. For example, it might be nice to have it at the end of U3 or the beginning of U4 before TCP since that project uses broadcast and this first is easier to understand than that project. --MF, 6/7/18

If we go with this approach next year, we need to update the link at the bottom of 3.2.2. --MF, 6/8/18

In this lab, you'll extend your Tic-Tac-Toe program from Unit 3 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 U3L2-TicTacToe project, and save it as U5-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?