المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : chess



C++ Programming
08-23-2013, 07:57 AM
Extend your legal chess move identification program as follows:
• Allow the user to add an arbitrary number of pieces to the board (either red/black or
white)
• Allow the user to select a given piece and then that piece must work out its set of
valid moves from its current position
• A piece cannot move over a piece which is the same colour as it is
• A piece may move over (and replace) a piece which is of the opposite colour.
• Create a Visualiser Abstract Base class which implements a show() pure virtual
function
• Create a TextVisualizer derived class which overrides show to display
the chess board (with legal moves for the selected piece) to the standard
output stream
• Create a GraphicalVisualizer derived class which overrides show to
display the chess board (with legal moves for the selected piece) as an
image.