Design a two-player board game. Start with Tic-Tac-Toe: players take turns placing a symbol, the game checks for a win or a draw. Then show how the design grows into Chess, where every piece moves by its own rules.
It must
- Two players take turns; the game rejects a move that is not that player's turn or is not allowed.
- The board can be N by N (not just 3 by 3).
- After each move the game checks for a win or draw and reports the status.
- Win rules are separate from the board so other games can reuse the board.
- Chess extension: each piece type has its own movement rule.
Keep in mind
Game coordinates turns only. It must not contain the win maths or the piece rules.- Adding a new rule (a new way to win) must not change existing classes.
- Playing against a computer and undo are follow-ups.