SCRATCH PROGRAMMING QUARTER FOUR

Back to index

View project at Scratch

Tic-Tac-Toe

Tic-Tac-Toe goes by different names in different countries. In some places it's called Noughts and Crosses. Nought is another word for zero.

ASSIGNMENT:

Make the following improvements to the demo:

  1. X's and 0's can only go in the nine cells of the grid and no matter where the user clicks in a cell the X or 0 is always properly centered.
  2. Randomly decide if X or 0 will go first and then have users take turns automatically.
  3. Reject or ignore clicks which are not in a cell.
  4. Highlight who's turn it is in some way.
  5. CHALLENGE: Detect a winning pattern or when the cells are all filled.