Kata
In this lesson, as in the previous, we'll start a kata before we introduce new material.
Tic-Tac-Toe
Try to implement the game of Tic-Tac-Toe as best as you can by following the TDD practices we have been using so far.
Tic-Tac-Toe rules:
- X always goes first
- Players alternate placing X's and O's on the board
- Players cannot play on a played position
- A player with three X's or O's in a row (horizontally, vertically, or diagonally) wins
- If all nine squares are filled and neither player achieves three in a row, the game is a draw
Important
Resist the temptation to read ahead until you have finished implementing the Tic-Tac-Toe kata.