Class FlatWorldResourceManager
java.lang.Object
net.lukemcomber.genetics.world.terrain.impl.FlatWorldResourceManager
- All Implemented Interfaces:
ResourceManager
The
ResourceManager
for FlatWorld
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFlatWorldResourceManager
(Terrain terrain, UniverseConstants constants) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionboolean
Initialize allTerrainProperty
boolean
Renew any daily resourcesboolean
renewEnvironmentResourceFromCellDeath
(Organism organism, Cell cell) Renew any resources that cell death may provideboolean
Tick the resources in the terrain
-
Field Details
-
DAILY_SOLAR_PROPERTY
- See Also:
-
INITIAL_SOIL_PROPERTY
- See Also:
-
-
Constructor Details
-
FlatWorldResourceManager
Creates a new instance- Parameters:
terrain
- terrain to manage resources forconstants
- configuration properties
-
-
Method Details
-
tickResources
public boolean tickResources()Tick the resources in the terrain- Specified by:
tickResources
in interfaceResourceManager
- Returns:
- true if resources are ticked
-
renewDailyEnvironmentResource
public boolean renewDailyEnvironmentResource()Renew any daily resources- Specified by:
renewDailyEnvironmentResource
in interfaceResourceManager
- Returns:
- true if resources are renewed
-
renewEnvironmentResourceFromCellDeath
Renew any resources that cell death may provide- Specified by:
renewEnvironmentResourceFromCellDeath
in interfaceResourceManager
- Parameters:
organism
- organism that diedcell
- cell that died- Returns:
- true if resources renewed
-
initializeAllTerrainResources
public boolean initializeAllTerrainResources()Initialize allTerrainProperty
- Specified by:
initializeAllTerrainResources
in interfaceResourceManager
- Returns:
- true if properties initialized
-