|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Command
Datatype that abstracts a basic game command entered at the game prompt.
Method Summary | |
---|---|
void |
construct(java.lang.String[] params)
construct is called when the Command is created. |
void |
exec(Player p)
exec is the main method of the command. |
java.lang.String |
toString()
|
Method Detail |
---|
void exec(Player p)
p
- is the main player. The player is passed to exec because
a lot of useful info, such as the current room, are attached to the
Player class.void construct(java.lang.String[] params)
Array
- of arguments to construct the command. Commands
can take no arguments.java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |