medium

Design a Chess Game

Design a system for a chess game that can be played by two users. The system should enforce the rules of chess, manage the game state, and provide a user interface for playing the game.

Suggested time: 45 minutes

Loading the workspace...

About this problem

Chess is one of the richest OOD problems because it combines strict rule enforcement, complex state management, and a natural class hierarchy. Before designing any classes, let's nail down exactly what the system must do.

What your design needs to cover

  • Legal Move Enforcement

  • Turn-Based Play

  • Check, Checkmate, and Stalemate Detection

  • Special Moves

  • Move History and Undo

Key challenges the editorial covers

Learn from other designs

Related problems

Guides