Class FlatWorldResourceManager

java.lang.Object
net.lukemcomber.genetics.world.terrain.impl.FlatWorldResourceManager
All Implemented Interfaces:
ResourceManager

public class FlatWorldResourceManager extends Object implements ResourceManager
  • Field Details

  • Constructor Details

    • FlatWorldResourceManager

      public FlatWorldResourceManager(Terrain terrain, UniverseConstants constants)
      Creates a new instance
      Parameters:
      terrain - terrain to manage resources for
      constants - configuration properties
  • Method Details

    • tickResources

      public boolean tickResources()
      Tick the resources in the terrain
      Specified by:
      tickResources in interface ResourceManager
      Returns:
      true if resources are ticked
    • renewDailyEnvironmentResource

      public boolean renewDailyEnvironmentResource()
      Renew any daily resources
      Specified by:
      renewDailyEnvironmentResource in interface ResourceManager
      Returns:
      true if resources are renewed
    • renewEnvironmentResourceFromCellDeath

      public boolean renewEnvironmentResourceFromCellDeath(Organism organism, Cell cell)
      Renew any resources that cell death may provide
      Specified by:
      renewEnvironmentResourceFromCellDeath in interface ResourceManager
      Parameters:
      organism - organism that died
      cell - cell that died
      Returns:
      true if resources renewed
    • initializeAllTerrainResources

      public boolean initializeAllTerrainResources()
      Initialize all TerrainProperty
      Specified by:
      initializeAllTerrainResources in interface ResourceManager
      Returns:
      true if properties initialized