Java Universal Role Playing Engine Version 0.3.9

jurpe.system.commands
Class DungeonCommand

java.lang.Object
  extended by jurpe.system.commands.DungeonCommand

public class DungeonCommand
extends java.lang.Object

A dungeon command is a group of commands issued by a player 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.


Constructor Summary
DungeonCommand(PlayerCommand cmd)
          Constructor
DungeonCommand(PlayerCommand cmd, java.lang.String feedback)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object o)
          Equality conditions
 PlayerCommand 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
 

Constructor Detail

DungeonCommand

public DungeonCommand(PlayerCommand cmd)
Constructor

Parameters:
cmd - PlayerCommand Issued command

DungeonCommand

public DungeonCommand(PlayerCommand cmd,
                      java.lang.String feedback)
Constructor

Parameters:
cmd - CommandID (see static fields)
feedback - Feedback when the user selects this command
Method Detail

getCommand

public PlayerCommand getCommand()
Get command ID

Returns:
command ID

setFeedback

public void setFeedback(java.lang.String f)
Set the feedback for when the user selects this command

Parameters:
f - Feedback when the user selects this command

getFeedback

public java.lang.String getFeedback()
Get feedback of this command

Returns:
feedback of this command

setOption

public void setOption(java.lang.String o)
Set an option for this command

Parameters:
o - Option for this command (ie> monster to attack)

getOption

public java.lang.String getOption()
Get command option

Returns:
command option if present, else null

hashCode

public int hashCode()
Direction hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code

equals

public boolean equals(java.lang.Object o)
Equality conditions

Overrides:
equals in class java.lang.Object
Parameters:
o - Object to compare
Returns:
True if o is equal to this

Java Universal Role Playing Engine Version 0.3.9

Copyright ? 2010 http://jurpe.sourceforge.net/ All Rights Reserved.