Hard
Design a Two-Player Chess Game Engine Object-Oriented Design Interview
Design a chess engine that models a board and pieces, validates legal turns and moves, records move history, and detects check, checkmate, stalemate, resignation, and forfeit.
1. Problem Statement
Design a two-player chess game engine that enforces alternating turns and legal moves, records history, and detects check, checkmate, stalemate, resignation, and forfeit.
2. Live Coding Format
Work in the provided coding workspace while explaining your decisions to the live interviewer. Validation may use inline tests, examples, comments, or a verbal walkthrough.
3. Key Focus Areas
- 1Board, square, piece, player, and game responsibilities
- 2Piece-specific movement versus full legal-move validation
- 3Check, checkmate, and stalemate detection
- 4Move history and special-rule extensibility
4. What Strong Candidates Should Demonstrate
- ✓Separate piece movement rules from whole-game move legality.
- ✓Model board ownership, turns, move history, and terminal game states.
- ✓Validate moves without corrupting board state when simulating check.
- ✓Reason about extensible handling of special moves and rule variants.
Want interactive feedback?
Practice this problem in the live coding workspace while the interviewer probes your clarification, implementation, trade-offs, and validation.
Start InterviewCore Concepts
Object-Oriented DesignGame ModelingRule Validation
