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:
- 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.
- Randomly decide if X or 0 will go first and then have users take turns
automatically.
- Reject or ignore clicks which are not in a cell.
- Highlight who's turn it is in some way.
- CHALLENGE: Detect a winning pattern or when the cells are all
filled.
|