Class CoastMask

java.lang.Object
davidmarino.service.mapservice.CoastMask

public class CoastMask extends Object
Class CoastMask
  • Constructor Details

    • CoastMask

      public CoastMask()
  • Method Details

    • getCoastMask

      public ArrayList<Polygon> getCoastMask(ArrayList<Polygon> polygons)
      Finds the coast site points by checking that a polygon has at least one neighbor that is seaLevel and not all neighbors are at seaLevel (isolated sea tile)
      Parameters:
      polygons -
      Returns:
      ArrayList<Polygon>
    • erodeInwardFromRandomCoastPoints

      public void erodeInwardFromRandomCoastPoints(ArrayList<Polygon> coastMask, double startPercent, double spreadChance, int maxChunks, int maxStepsPerChunk)
      Turns land to sea randomly in a inward direction.
      Parameters:
      coastMask - holds the polygons that are on the coast
      startPercent - is the chance for erosion to start
      spreadChance - is the chance for an eroding tile to spread
      maxChunks - is the max number of erosion start events
      maxStepsPerChunk - is the maximum number of tiles to change to sea