|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjurpe.system.commands.DungeonCommand
public class DungeonCommand
A dungeon command is a group of constants that represent a command issued in the dungeon. It encapsulate a "feedback" string to communicate to the user the results of the command and an "option" so that the command can have a parameter.
| Field Summary | |
|---|---|
static int |
ATTACK_MONSTER
|
static int |
CLOSE_DOOR
|
static int |
DIG
|
static int |
ENTER
|
static int |
ENTER_DUNGEON
|
static int |
ENTER_INN
|
static int |
ENTER_SHOP
|
static int |
ENTER_TRAINER
|
static int |
MOVE
|
static int |
OPEN_DOOR
|
static int |
PICK_UP
|
static int |
STAIRS_DOWN
|
static int |
STAIRS_UP
|
static int |
UNKNOWN
|
| Constructor Summary | |
|---|---|
DungeonCommand(int command)
Constructor |
|
DungeonCommand(int command,
java.lang.String feedback)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Equality conditions |
int |
getCommand()
Get command ID |
java.lang.String |
getFeedback()
Get feedback of this command |
java.lang.String |
getOption()
Get command option |
int |
hashCode()
Direction hash code. |
void |
setFeedback(java.lang.String f)
Set the feedback for when the user selects this command |
void |
setOption(java.lang.String o)
Set an option for this command |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DIG
public static final int ENTER
public static final int ENTER_SHOP
public static final int ENTER_INN
public static final int ENTER_TRAINER
public static final int ENTER_DUNGEON
public static final int MOVE
public static final int STAIRS_UP
public static final int STAIRS_DOWN
public static final int ATTACK_MONSTER
public static final int OPEN_DOOR
public static final int CLOSE_DOOR
public static final int PICK_UP
public static final int UNKNOWN
| Constructor Detail |
|---|
public DungeonCommand(int command)
command - CommandID (see static fields)
public DungeonCommand(int command,
java.lang.String feedback)
command - CommandID (see static fields)feedback - Feedback when the user selects this command| Method Detail |
|---|
public int getCommand()
public void setFeedback(java.lang.String f)
f - Feedback when the user selects this commandpublic java.lang.String getFeedback()
public void setOption(java.lang.String o)
o - Option for this command (ie> monster to attack)public java.lang.String getOption()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - Object to compare
|
Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||