Problem statement
Design the object model and core APIs for an English-draughts (checkers) engine that validates moves, enforces mandatory captures and multi-jumps, promotes kings, and detects game end for a two-player local match.
Operating context. An 8x8 board, two players (dark and light) with twelve pieces each on the dark squares, moving diagonally. Simple men move one square forward; kings move both directions. Captures jump an adjacent enemy piece to the empty square beyond and are mandatory when any capture exists. A capture can chain into a multi-jump, keeping the turn until the chain ends. A man reaching the far rank is promoted to king. A side with no pieces or no legal move loses; agreed repetition or inactivity draws. Turns alternate, single in-process match, one game at a time.
Out of scope. AI opponents and move search, networked play, board sizes and variants beyond a rule seam, move clocks and time controls, and any rendering or animation.
What to produce. The class model (board, square, piece with man and king behaviors, move, game, rule set), the public API each exposes, and how legal moves are generated for the side to move. Be explicit about how the mandatory-capture and multi-jump rules are encapsulated, how king promotion and man-versus-king movement stay polymorphic rather than type-checked, how win and draw are detected, and how a variant (international 10x10, capture-optional) plugs in without editing the move generator.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design LLD
- Oop Solid
- Patterns Strategy
- Oop Polymorphism
- Domain Board-Games