| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Class of squares of land.
Constructor Summary | |
SquareOfLand(String landType, int x, int y, boolean explored) Create a new SquareOfLand of the given type. | |
SquareOfLand(int x, int y, boolean explored) Create a new SquareOfLand of a random type. |
Method Summary | |
void | _place(Human human) Place a human on this square, without triggering an event. |
void | _place(Construction construction) Place a construction on this square, without triggering an event. |
void | _setHuman(Human human) Set the given human on this square of land. |
boolean | containsLandResource(String resourceName) Check wheter this square has the named landresource. |
void | evolve(double val) Evolve this square of land. |
Construction | getConstruction() Return the construction on this square of land. |
double | getExplorationState() Return the state of exploration of this square of land. |
Human | getHuman() Return the human on this square of land. |
InfoList | getInfo() Return the infolist for this square of land. |
LandResource | getLandResource(String resName) Return the named landresource. |
Map | getLandResources() Get all the landresources for this square. |
String | getLandState() Return the state of the land on this square, "Unexplored" if the landtype is yet unknown. |
String | getLandType() Return the land type of this square of land. |
double | getPriority() Returns the priority of this evolver. |
int | getX() Return the x-coordinate of this square of land. |
int | getY() Return the y-coordinate of this square of land. |
boolean | hasEnoughLandResources(Map neededLandResources) Checks whether this square has enough landresources to perform a particular action. |
boolean | isExplored() Is this square explored? |
double | maxEnergyProduction(Map m1, Map m2) Whats the max energy this evolver will produce in this step. |
void | modResource(String resName, double value) Modify the named landresource by value. |
void | place(Human human) Place a human on this square, and trigger a SquareChangedEvt. |
void | place(Construction construction) Place a construction on this square, and trigger a SquareChangedEvt. |
void | printInfo() Just for testing and debugging. |
boolean | producesEnergy() Does this evolver produce energy? |
protected void | setConstruction(Construction construction) Set the given construction on this square of land. |
void | setExplorationState(double s) Set the state of exploration of this square of land. |
protected void | setLandResources(Map r) Install a map of landresources. |
void | setLandType(String landType) Set the land type of this square of land. |
protected void | setX(int x) Set the x-coordinate of this square of land. |
protected void | setY(int y) Set the y-coordinate of this square of land. |
Constructor Detail |
public SquareOfLand(String landType, int x, int y, boolean explored)
public SquareOfLand(int x, int y, boolean explored)
Method Detail |
public void _place(Human human)
throws IllegalPlacementException
public void _place(Construction construction)
throws IllegalPlacementException
public void _setHuman(Human human)
public boolean containsLandResource(String resourceName)
public void evolve(double val)
public Construction getConstruction()
public double getExplorationState()
public Human getHuman()
public InfoList getInfo()
public LandResource getLandResource(String resName)
public Map getLandResources()
public String getLandState()
public String getLandType()
public double getPriority()
public int getX()
public int getY()
public boolean hasEnoughLandResources(Map neededLandResources)
public boolean isExplored()
public double maxEnergyProduction(Map m1, Map m2)
public void modResource(String resName, double value)
public void place(Human human)
throws IllegalPlacementException
public void place(Construction construction)
throws IllegalPlacementException
public void printInfo()
public boolean producesEnergy()
protected void setConstruction(Construction construction)
public void setExplorationState(double s)
protected void setLandResources(Map r)
public void setLandType(String landType)
protected void setX(int x)
protected void setY(int y)
Association Links |
to Class evolution.Human
to Class evolution.constructions.Construction
to Class java.util.Map
| a gvijf production | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |