001    /**
002     * Implementation of the 'help' user command.
003     * 
004     * @author Michael Kolling and David J. Barnes
005     * @version 2011.07.31
006     */
007    public class HelpCommand extends Command
008    {
009        private CommandWords commandWords;
010        
011        /**
012         * Constructor for objects of class HelpCommand
013         */
014        public HelpCommand(CommandWords words)
015        {
016            commandWords = words;
017        }
018        
019        /**
020         * Print out some help information. Here we print some stupid, 
021         * cryptic message and a list of the command words.
022         * Returns always false.
023         */
024        public boolean execute(Player player)
025        {
026            System.out.println("You are lost. You are alone. You wander");
027            System.out.println("around at the university.");
028            System.out.println();
029            System.out.println("Your command words are:");
030            commandWords.showAll();
031            return false;
032        }
033    }