[ ] Implement a CommandProcessor class that gets commands from the console as a string using its readCommand()private method which stores the command internally in a collection of Command objects using the saveCommand()
method, and provides a public getCommand() method to other objects such as the GameEngine or the Player.
[ ] Once a command gets executed, the effect of the command can be stored as a string in the Command object using
the saveEffect() method.
[ ] Any game component that operates using commands must get its commands from a
CommandProcessor object.
[ ] The command processor should have a validate() method that can be called to
check if the command is valid in the current game state.
[ ] If the command is not valid, a corresponding error message should be saved in the effect of the command.
[ ] Implement a FileCommandProcessorAdapter class that enables the same functionality as the above, except that
it reads the commands sequentially from a previously saved text file. This class needs to abide with all the design
characteristics and restrictions of the Adapter design pattern.
[ ] The application should accept a command line argument that enables the user to choose between accepting the
commands from the console (-console) or from a file (-file ).
[ ] This must be implemented as part of a single .cpp/.h file duo named CommandProcessing.cpp/
CommandProcessing.h. You must deliver a driver as a free function named testCommandProcessor() that
demonstrates that (1) commands can be read from the console using the CommandProcessor class (2)
commands can be read from a saved text file using the FileCommandProcessorAdapter (3) commands that are
invalid in the current game state are rejected, and valid commands result in the correct effect and state change.
This driver function must be in the CommandProcessingDriver.cpp file.
[ ] Implement a CommandProcessor class that gets commands from the console as a string using its readCommand() private method which stores the command internally in a collection of Command objects using the saveCommand() method, and provides a public getCommand() method to other objects such as the GameEngine or the Player.
[ ] Once a command gets executed, the effect of the command can be stored as a string in the Command object using the saveEffect() method.
[ ] Any game component that operates using commands must get its commands from a CommandProcessor object.
[ ] The command processor should have a validate() method that can be called to check if the command is valid in the current game state.
[ ] If the command is not valid, a corresponding error message should be saved in the effect of the command.
[ ] Implement a FileCommandProcessorAdapter class that enables the same functionality as the above, except that it reads the commands sequentially from a previously saved text file. This class needs to abide with all the design characteristics and restrictions of the Adapter design pattern.
[ ] The application should accept a command line argument that enables the user to choose between accepting the commands from the console (-console) or from a file (-file).