Class HelpCommand

java.lang.Object
  extended by Command
      extended by HelpCommand

public class HelpCommand
extends Command

Implementation of the 'help' user command.

Version:
2011.07.31
Author:
Michael Kolling and David J. Barnes

Field Summary
private  CommandWords commandWords
           
 
Constructor Summary
HelpCommand(CommandWords words)
          Constructor for objects of class HelpCommand
 
Method Summary
 boolean execute(Player player)
          Print out some help information.
 
Methods inherited from class Command
getSecondWord, hasSecondWord, setSecondWord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandWords

private CommandWords commandWords
Constructor Detail

HelpCommand

public HelpCommand(CommandWords words)
Constructor for objects of class HelpCommand

Method Detail

execute

public boolean execute(Player player)
Print out some help information. Here we print some stupid, cryptic message and a list of the command words. Returns always false.

Specified by:
execute in class Command
Returns:
True, if game should exit; false otherwise.