Loading...
From the requirements, the core objects for the chess system are:
Game object will manage two Player objects, alternating turns between them.Game will initialize and interact with the Board object for state updates.Board will contain pieces placed on Square objects.Piece will validate its specific movement logic through a Move object.Player will control a set of pieces (White or Black).To promote code reuse, the chess pieces will inherit from a common base class:
Piece (Abstract Class): Contains common attributes like position and color.
Game manages gameplay, Board manages the grid).King, Queen, etc.) can replace the base class (Piece) without breaking functionality.Game depend on abstractions like Piece and not concrete implementations.