se.chalmers.dat255.risk.model
Constructor and Description |
---|
Province(java.lang.String province)
Creates a new Province
|
Modifier and Type | Method and Description |
---|---|
void |
addUnits(int units)
Adds units to this province
|
java.lang.String |
getId()
Fetches the string identification of this province
|
int |
getUnits()
Getter for units in the province
|
boolean |
isActive()
Checks if the province is in an active state.
|
void |
moveUnits(int units,
IProvince province)
Move units forom this province to another province.
|
void |
removeUnits(int units)
Removes units from this province
|
void |
setActive(boolean active)
Sets the state of this province.
|
public Province(java.lang.String province)
province
- id of the provincepublic int getUnits()
IProvince
public void addUnits(int units)
IProvince
public void removeUnits(int units)
IProvince
removeUnits
in interface IProvince
units
- number of units to be removedpublic void moveUnits(int units, IProvince province)
IProvince
public java.lang.String getId()
IProvince
public boolean isActive()
IProvince