|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.server.ai.ColonyPlan
public class ColonyPlan
Objects of this class describes the plan the AI has for a Colony.
A ColonyPlan contains WorkLocationPlans which defines
the production of each Building and ColonyTile.
Colony| Field Summary | |
|---|---|
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
LICENSE
|
static java.lang.String |
REVISION
|
| Constructor Summary | |
|---|---|
ColonyPlan(AIMain aiMain,
Colony colony)
Creates a new ColonyPlan. |
|
ColonyPlan(AIMain aiMain,
org.w3c.dom.Element element)
Creates a new ColonyPlan. |
|
| Method Summary | |
|---|---|
void |
create()
Creates a plan for this colony. |
AIMain |
getAIMain()
Gets the main AI-object. |
java.util.Iterator<java.lang.Integer> |
getBuildable()
Gets an Iterator for everything to be built in the
Colony. |
Colony |
getColony()
Gets the Colony this ColonyPlan controls. |
Game |
getGame()
Get the Game this object is associated to. |
int |
getProductionOf(int goodsType)
Returns the production of the given type of goods accoring to this plan. |
java.util.List<WorkLocationPlan> |
getSortedWorkLocationPlans()
Returns the WorkLocationPlans associated with this
ColonyPlan sorted by production in a decreasing order. |
java.util.List<WorkLocationPlan> |
getWorkLocationPlans()
Returns the WorkLocationPlans associated with this
ColonyPlan. |
static java.lang.String |
getXMLElementTagName()
Returns the tag name of the root element representing this object. |
void |
readFromXMLElement(org.w3c.dom.Element element)
Updates this object from an XML-representation of a ColonyPlan. |
org.w3c.dom.Element |
toXMLElement(org.w3c.dom.Document document)
Creates an XML-representation of this object. |
| 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 COPYRIGHT
public static final java.lang.String LICENSE
public static final java.lang.String REVISION
| Constructor Detail |
|---|
public ColonyPlan(AIMain aiMain,
Colony colony)
ColonyPlan.
aiMain - The main AI-object.colony - The colony to make a ColonyPlan for.
public ColonyPlan(AIMain aiMain,
org.w3c.dom.Element element)
ColonyPlan.
aiMain - The main AI-object.element - An Element containing an XML-representation
of this object.| Method Detail |
|---|
public java.util.List<WorkLocationPlan> getWorkLocationPlans()
WorkLocationPlans associated with this
ColonyPlan.
WorkLocationPlans .public java.util.List<WorkLocationPlan> getSortedWorkLocationPlans()
WorkLocationPlans associated with this
ColonyPlan sorted by production in a decreasing order.
WorkLocationPlans .public java.util.Iterator<java.lang.Integer> getBuildable()
Iterator for everything to be built in the
Colony.
Buildable sorted by
priority (highest priority first).public AIMain getAIMain()
public Game getGame()
Game this object is associated to.
Game.public void create()
public int getProductionOf(int goodsType)
goodsType - The type of goods to check the production for.
ColonyPlan.public Colony getColony()
Colony this ColonyPlan controls.
Colony.public org.w3c.dom.Element toXMLElement(org.w3c.dom.Document document)
document - The Document in which the
XML-representation should be created.
public void readFromXMLElement(org.w3c.dom.Element element)
ColonyPlan.
element - The XML-representation.public static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||