예제 #1
0
        /// Given a command: process (that is: Execute) the command.
        /// Return true If the command ends the game, false otherwise.
        private bool processCommand(Command command)
        {
            if (!commandMapper.isCommand(command.CommandWord))
            {
                Console.WriteLine("I don't know what you mean...");
                return(false);
            }
            Response response = commandMapper.getResponse(command.CommandWord);

            return(response.Execute(command));
        }