|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwyvern.kernel.properties.PList
wyvern.kernel.maps.MapObject
wyvern.lib.classes.StaticObject
wyvern.lib.classes.town.ATM
A machine that lets you manipulate your bank account.
| Field Summary |
| Fields inherited from class wyvern.kernel.maps.MapObject |
IN_MAP_EDITOR, listenerList_ |
| Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
| Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
| Constructor Summary | |
ATM()
|
|
| Method Summary | |
void |
apply(Commandable agent)
User applied the ATM. |
CommandEvent |
createEvent(CommandEvent event)
Creates the event. |
boolean |
deposit(CommandEvent event)
Deposits some money. |
boolean |
execute(CommandEvent event)
Executes the event. |
java.lang.String |
formatMoney(long amount)
Puts commas in to make numbers more readable. |
boolean |
getBalance(CommandEvent event)
Tells the player their bank balance. |
void |
initialize()
Sets any properties not specified in archetype file. |
boolean |
knowsCommand(java.lang.String cmd)
Returns true for "deposit", "balance", etc. |
boolean |
printHelp(Commandable agent)
Prints instructions. |
boolean |
withdraw(CommandEvent event)
Performs a withdrawal. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ATM()
| Method Detail |
public void initialize()
initialize in interface GameObjectinitialize in class StaticObjectpublic boolean knowsCommand(java.lang.String cmd)
knowsCommand in interface Commandcmd - the entire command string, including arguments
public CommandEvent createEvent(CommandEvent event)
createEvent in interface Commandevent - a "blank" CommandEvent containing only the
command text and the agent who's performing the command. This
initial event is created by the originator of the event (e.g.
the AI or player's command preprocessor).
public boolean execute(CommandEvent event)
execute in interface Commandevent - the event
public boolean getBalance(CommandEvent event)
public boolean deposit(CommandEvent event)
public boolean withdraw(CommandEvent event)
public boolean printHelp(Commandable agent)
public java.lang.String formatMoney(long amount)
amount - the amount of money to format
public void apply(Commandable agent)
apply in interface Applyableagent - the person applying the object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||