Design: Chess Piece Movement System
Design focuses on piece movement logic and rules using polymorphism. It excludes UI, game state management, and network communication.
Functional Requirements
FR1: Support different chess pieces with unique movement rules (Pawn, Rook, Knight, Bishop, Queen, King).
FR2: Allow querying valid moves for any piece on a given board state.
FR3: Enforce movement constraints like board boundaries and piece blocking.
FR4: Support extension to add new piece types with custom movement rules without changing existing code.
Non-Functional Requirements
NFR1: System should respond to move queries within 50ms.
NFR2: Support up to 32 pieces on the board simultaneously.
NFR3: Design should be maintainable and extensible for future piece types.
NFR4: Memory usage should be minimal to run on low-resource devices.