Package model.facility
Class Facility
java.lang.Object
model.facility.Facility
- All Implemented Interfaces:
Serializable
,Buildable
- Direct Known Subclasses:
Education
,EffectualFacility
,Road
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Coordinate
protected Dimension
protected int
protected int
-
Constructor Summary
ConstructorsConstructorDescriptionFacility
(int oneTimeCost, int maintenanceFee, Coordinate coordinate, Dimension dimension) -
Method Summary
Modifier and TypeMethodDescriptionint
int
Every buildable cost some when built.boolean
if buildable is connected to master roadvoid
resetConnected
(Buildable connectingPoint, Buildable[][] map) Resets the connected property with the current possibility of connectionvoid
setConnected
(Buildable connectingPoint, Buildable[][] map) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface model.common.Buildable
getBuildableType, isUnderConstruction
-
Field Details
-
oneTimeCost
protected int oneTimeCost -
maintenanceFee
protected int maintenanceFee -
coordinate
-
dimension
-
-
Constructor Details
-
Facility
-
-
Method Details
-
isConnected
public boolean isConnected()Description copied from interface:Buildable
if buildable is connected to master road- Specified by:
isConnected
in interfaceBuildable
- Returns:
- true id connected
-
resetConnected
Resets the connected property with the current possibility of connection- Parameters:
connectingPoint
- master roadmap
- map of city
-
setConnected
-
getOneTimeCost
public int getOneTimeCost()Description copied from interface:Buildable
Every buildable cost some when built.- Specified by:
getOneTimeCost
in interfaceBuildable
- Returns:
- the costs.
-
getMaintenanceFee
public int getMaintenanceFee() -
getCoordinate
- Specified by:
getCoordinate
in interfaceBuildable
- Returns:
- the coordinate of the buildable
-
getDimension
- Specified by:
getDimension
in interfaceBuildable
- Returns:
- the dimension of the buildable
-
toString
-