Part 1 of 6 · 1 min read
Why this page comes second in Level 6
In this module you will
- Apply the five-step method to a turn-based board game.
- Separate the board, the game rules and the players.
- Detect a win in constant time using counters.
- Reject bad moves with clear errors and leave the game unchanged.
- Extend the design to an N by N board, a computer player and undo.
Tic-tac-toe is small, so the round can go deep on design choices, not on volume. It is a common warm-up and a good test of whether the board, the rules and the players are kept apart. The same shape carries over to snake and ladder (module 3) and chess (module 7). This page uses the five steps of Level 0, module 4. No book was supplied for this track, so the content is common practice, not from the books. The Java code was compiled and run before it was written here. Numbers marked "made up" only show the idea.