Introduction, and Asking Questions

In the first part of this lab, we'll be making a computer player for the game Tic-Tac-Toe. We're not, right now, dealing with the user interface part of the game (displaying the board, accepting a move from the user, or even noticing when someone wins). Those parts have been done for you. You'll learn more about making those things in the second portion of the lab. Here is a starter file for you to use. Try clicking the green flag to play the game. The computer is playing with a very unintelligent strategy for the moment, which you will improve upon in this lab.

The program will allow a human user to play against the computer. Your goal in this project is to write a block, ttt, that will determine the computer's next move based on the current position.

The ttt block will report the computer's next move given the current configuration. Here's what we'd like out of the block:

If those don't sound super defined (current state, where to move), don't worry- we'll define them on the next page together.

Which question should we ask ourselves before we begin?

How do you win tic-tac-toe?
What constitutes a good move?
What do I want my tic-tac-toe block to accomplish?
All of the above are good questions you should ask.