public class Plot
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
cost |
private int |
energyMod |
private int |
foodMod |
private int |
oreMod |
private Player |
player |
private Roboticon |
roboticon |
private int |
terrain |
Constructor and Description |
---|
Plot(int foodModifier,
int energyModifier,
int oreModifier,
int terrainType)
The is the constructor of the Plot class to instantiate a new instance of the Plot class.
|
Modifier and Type | Method and Description |
---|---|
void |
addRoboticon(Roboticon roboticon)
A setter for the roboticon working on the plot.
|
void |
changeTerrain(int newTerrain)
A setter for the terrain type.
|
int |
getEnergyMod()
A getter for the energy modifier.
|
int |
getFoodMod()
A getter for the food modifier.
|
int |
getOreMod()
A getter for the ore modifier.
|
Player |
getPlayer()
A getter for the player who owns the plot.
|
Roboticon |
getRoboticon()
A getter to retrieve a plot's assigned roboticon.
|
int |
getTerrain()
A getter for the terrain type.
|
boolean |
hasRoboticon()
A test to check whether some plot has a roboticon assigned to it or not.
|
void |
removeRoboticon()
A setter to remove the assigned roboticon from some plot object.
|
void |
setPlayer(Player player)
A setter for the player who owns the plot.
|
private int foodMod
private int energyMod
private int oreMod
private int terrain
public static final int cost
private Roboticon roboticon
private Player player
public Plot(int foodModifier, int energyModifier, int oreModifier, int terrainType)
foodModifier
- The value of the food modifier of a Plot instance.energyModifier
- The value of the energy modifier of a Plot instance.oreModifier
- The value of the ore modifier of a Plot instance.terrainType
- The terrain type of a Plot instance.public int getFoodMod()
public int getEnergyMod()
public int getOreMod()
public int getTerrain()
public void changeTerrain(int newTerrain)
newTerrain
- The new terrain to be assigned to the object.public Player getPlayer()
public void setPlayer(Player player)
player
- The new player to be set as owner of the plot.public void addRoboticon(Roboticon roboticon)
roboticon
- The roboticon to be assigned to work on the plot object.public void removeRoboticon()
public boolean hasRoboticon()
public Roboticon getRoboticon()