Package model.zone
Class CommercialZone
java.lang.Object
model.zone.Zone
model.zone.CommercialZone
- 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
ConstructorsConstructorDescriptionCommercialZone
(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
reverseEffect
(Zone zone, GameModel gm) Reverse special effect of the facility on a given zone.Methods 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
-
CommercialZone
public CommercialZone(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
-