|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjurpe.containers.Inventory
public class Inventory
PCharacter Inventory. Contains an ArrayList of BasicItems
Constructor Summary | |
---|---|
Inventory()
Constructs a new Inventory with default money quantity. |
|
Inventory(int denari)
Constructs new Inventory with "denary" money |
Method Summary | |
---|---|
void |
addBasicItem(BasicItem x)
Add BasicItem x to current Inventory |
void |
earnMoney(int somma)
Add "somma" money to current money |
void |
earnMoney(long somma)
Add "somma" money to current money |
int |
getAvailableMoney()
Get current money available |
int |
getEncumbrance()
Get current character encumbrance |
java.util.AbstractList<BasicItem> |
getInventoryItems()
Get ArrayList containing BasicItem available to character |
void |
removeBasicItem(BasicItem x)
Remove BasicItem x from Inventory |
void |
sellBasicItem(BasicItem x,
int price)
Remove BasicItem x from Inventory |
void |
spendMoney(int somma)
Remove "somma" money from current money |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Inventory()
public Inventory(int denari)
denari
- MoneyMethod Detail |
---|
public int getAvailableMoney()
public java.util.AbstractList<BasicItem> getInventoryItems()
public void addBasicItem(BasicItem x)
x
- BasicItem to add to Inventorypublic void removeBasicItem(BasicItem x)
x
- BasicItem to removeBasicItem
public void sellBasicItem(BasicItem x, int price)
x
- BasicItem to removeprice
- Earn money amount when selling itemBasicItem
public void spendMoney(int somma)
somma
- Money to be spentpublic void earnMoney(int somma)
somma
- public void earnMoney(long somma)
somma
- public int getEncumbrance()
|
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 |