|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.monsters.Wallet
This class has utility methods for adding and removing coins from a monster or player's "wallet". The wallet consists of coins in their top-level inventory and coins in any coin purse(s) they may be carrying.
Constructor Summary | |
Wallet()
|
Method Summary | |
static void |
adjustTotal(Monster m,
long amount)
Adjusts the total number of coins for the monster by the specified amount. |
static long |
getTotal(Monster m)
Returns the total, converted to silver coins, that the monster is carrying in top-level inventory. |
static void |
main(java.lang.String[] args)
Tests the make-change algorithm. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Wallet()
Method Detail |
public static long getTotal(Monster m)
public static void adjustTotal(Monster m, long amount)
m
- the monster to do this toamount
- the amount to add (or deduct, if the value
is negative). If deducting, takes from silver first, then
gold, then platinum.public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |