|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrails.game.StartPacket
public class StartPacket
A Start Packet comprises a number of Start Items. The typical start packet must be completely sold out before normal share buying can start (but there are exceptions to this rule).
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_NAME
Default name |
protected static org.apache.log4j.Logger |
log
|
Constructor Summary | |
---|---|
StartPacket(java.lang.String name,
java.lang.String roundClassName)
Constructor. |
Method Summary | |
---|---|
boolean |
areAllSold()
Check if all items have bene sold. |
void |
configureFromXML(Tag tag)
Configure the start packet from the contents of a <StartPacket> XML element. |
StartItem |
getFirstItem()
Get the first start item. |
StartItem |
getFirstUnsoldItem()
Get the first start item that has not yet been sold. |
StartItem |
getItem(int index)
|
java.util.List<StartItem> |
getItems()
Get the items of this start packet. |
int |
getMinimumIncrement()
|
int |
getMinimumInitialIncrement()
|
int |
getModulus()
|
int |
getNumberOfItems()
|
java.lang.String |
getRoundClassName()
Get the name of the StartRound class that will sell out this packet. |
java.util.List<StartItem> |
getUnsoldItems()
Get all not yet sold start items. |
protected void |
init(GameManagerI gameManager)
This method must be called after all XML parsing has completed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_NAME
protected static org.apache.log4j.Logger log
Constructor Detail |
---|
StartPacket(java.lang.String name, java.lang.String roundClassName)
name
- The start packet name.roundClassName
- The StartRound class name.Method Detail |
---|
public void configureFromXML(Tag tag) throws ConfigurationException
element
- The <StartPacket> Element object.
ConfigurationException
- if anything goes wrong.protected void init(GameManagerI gameManager)
public java.util.List<StartItem> getItems()
public StartItem getItem(int index)
public StartItem getFirstItem()
public StartItem getFirstUnsoldItem()
public java.util.List<StartItem> getUnsoldItems()
public boolean areAllSold()
public java.lang.String getRoundClassName()
public int getNumberOfItems()
public int getMinimumIncrement()
public int getMinimumInitialIncrement()
public int getModulus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |