Part 2 of 6 · 1 min read
Requirements
Ask about size, players and what ends the game.
Think of two people with a paper grid. Before they start, they agree on the grid size, who goes first and what counts as a win. A design round starts with the same agreements.
Questions and the answers assumed here:
- How big is the board? Start at 3 by 3, but the size should be a setting.
- Who plays? Two players, X first, taking turns.
- What ends the game? A full row, column or diagonal of one mark, or a full board with no winner (a draw).
- What is a bad move? Playing off the board, on a taken cell, out of turn, or after the game ended.
- Is a computer player needed? Out of scope for now, but the design should allow it.
The numbered requirements:
- R1. Two marks, X and O, alternate, with X first.
- R2. A move names a row and a column.
- R3. A bad move is refused with a reason and changes nothing.
- R4. The game ends with a win when a mark fills a whole line, or a draw when the board is full.
- R5. After the game ends, no more moves are accepted.
- R6. The board size is set when the game is made.
The nouns are board, cell, mark, move, player and game. The verbs are play, place, win and draw.
Check yourself: 1. What are the three ways a move can be bad, apart from a finished game? 2. What ends a game? 3. Which requirement says the size can change?