Lab 3: Tic-Tac-Toe

Can we cut all this commented out text? --MF, 8/31/19
Content: idenitfying if someone has won the game
Goal: higher-order functions (learning map for the first time; reviewing others)

In this lab, students will continue the Tic-Tac-Toe project by teaching the computer how to detect a win or a tie. To do this, the program must remember the moves that have been made. (In a sense, the program already does have that memory, but it is spread out among the nine sprite clones representing the individual squares. Here we add a model of the board in one place, so the program can reason about it.)

The capacity to remember and analyze moves will later be used to let the program make sensible moves as a player.

Pacing

The 3 lab pages could be split across 2–4 days (65–130 minutes). Expected times to complete follow:

Lab Pages

Solutions

Correlation with 2020 AP CS Principles Framework 

There are no AP CSP standards connected to this lab.