Package model.zone
Class IndustrialZone
java.lang.Object
model.zone.Zone
model.zone.IndustrialZone
- All Implemented Interfaces:
Serializable
,Buildable
,SideEffect
- See Also:
-
Field Summary
Fields inherited from class model.zone.Zone
birthday, buildableType, citizens, coordinate, dayToBuild, dimension, effectRadius, isUnderConstruction, level, statistics
-
Constructor Summary
ConstructorsConstructorDescriptionIndustrialZone
(Level level, int dayToBuild, ZoneStatistics statistics, Date birthday, Coordinate coordinate, float effectRadius) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Evaluates the condition for the facility to have effect on a given zonevoid
Applies special effect of the facility on a given zone.A type can be:int
void
Pollution effects on the given zonevoid
reverseEffect
(Zone zone, GameModel gm) Reverse special effect of the facility on a given zone.void
reversePollute
(Zone zone, GameModel gm) Removes pollution effects on the given zoneMethods inherited from class model.zone.Zone
addCitizen, getBirthday, getCitizens, getCoordinate, getDimension, getFreeWorkSpaceEffect, getIndustrialEffect, getLevel, getOneTimeCost, getPoliceEffect, getPopulation, getStatistics, getZoneSatisfaction, getZonRelatedSatisfaction, isConnected, isUnderConstruction, removeCitizen, resetConnected, setLevel, setUnderConstruction, toString, updateForestEffect, updateIndustrialEffect, updatePoliceEffect, updateStadiumEffect
-
Constructor Details
-
IndustrialZone
public IndustrialZone(Level level, int dayToBuild, ZoneStatistics statistics, Date birthday, Coordinate coordinate, float effectRadius)
-
-
Method Details
-
getBuildableType
Description copied from interface:Buildable
A type can be:- Specified by:
getBuildableType
in interfaceBuildable
- Overrides:
getBuildableType
in classZone
- Returns:
- the type of the buildable
-
effect
Description copied from interface:SideEffect
Applies special effect of the facility on a given zone. if condition is satisfied.- Specified by:
effect
in interfaceSideEffect
- Parameters:
zone
- the zone to effect.
-
reverseEffect
Description copied from interface:SideEffect
Reverse special effect of the facility on a given zone. if condition is satisfied.- Specified by:
reverseEffect
in interfaceSideEffect
- Parameters:
zone
- the zone to effect.
-
condition
Description copied from interface:SideEffect
Evaluates the condition for the facility to have effect on a given zone- Specified by:
condition
in interfaceSideEffect
- Parameters:
zone
- the zone to check- Returns:
- true if condition is satisfied, otherwise, false
-
getCapacity
public int getCapacity()- Overrides:
getCapacity
in classZone
-
pollute
Pollution effects on the given zone- Parameters:
zone
- zone to be polluted.gm
- game model
-
reversePollute
Removes pollution effects on the given zone- Parameters:
zone
- zone to be polluted.gm
- game model
-