Class AreaFactory
- java.lang.Object
-
- bytemusketeers.heslingtonhustle.scene.AreaFactory
-
public final class AreaFactory extends java.lang.Object
TheAreaFactory
provides a non-static factory for initialising particularArea
objects, populated withInteractable
objects- Author:
- ENG1 Team 23 (Cohort 3)
- See Also:
Area
,Interactable
-
-
Field Summary
Fields Modifier and Type Field Description private MetricController
metricController
TheMetricController
belonging to the parentalPlayScreen
, generally used when registeringRunnable
actions onInteractable
s in the createdArea
private PlayScreen
playScreen
-
Constructor Summary
Constructors Constructor Description AreaFactory(MetricController metricController, PlayScreen playScreen)
Instantiates a newAreaFactory
with the given contextualMetricController
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Area
createBedroomMap()
Creates anArea
of the bedroom buildingArea
createCSMap()
Creates anArea
of the Ian Wand Computer Science buildingArea
createOutdoorMap()
Crates anArea
of the Campus East outdoors areaArea
createPiazzaMap()
Creates anArea
of the Piazza building
-
-
-
Field Detail
-
metricController
private final MetricController metricController
TheMetricController
belonging to the parentalPlayScreen
, generally used when registeringRunnable
actions onInteractable
s in the createdArea
-
playScreen
private final PlayScreen playScreen
- See Also:
Interactable.interact()
-
-
Constructor Detail
-
AreaFactory
public AreaFactory(MetricController metricController, PlayScreen playScreen)
Instantiates a newAreaFactory
with the given contextualMetricController
- Parameters:
metricController
- TheMetricController
belonging to the parentalScreen
-
-
Method Detail
-
createOutdoorMap
public Area createOutdoorMap() throws InvalidAreaException
Crates anArea
of the Campus East outdoors area- Returns:
- The generated test map
- Throws:
InvalidAreaException
-
createPiazzaMap
public Area createPiazzaMap() throws InvalidAreaException
Creates anArea
of the Piazza building- Returns:
- The generated Piazza map
- Throws:
InvalidAreaException
-
createCSMap
public Area createCSMap() throws InvalidAreaException
Creates anArea
of the Ian Wand Computer Science building- Returns:
- The generated Computer Science building
- Throws:
InvalidAreaException
-
createBedroomMap
public Area createBedroomMap() throws InvalidAreaException
Creates anArea
of the bedroom building- Returns:
- The generated bedroom building
- Throws:
InvalidAreaException
-
-