Class CoastMask
java.lang.Object
davidmarino.service.mapservice.CoastMask
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
erodeInwardFromRandomCoastPoints
(ArrayList<Polygon> coastMask, double startPercent, double spreadChance, int maxChunks, int maxStepsPerChunk) Turns land to sea randomly in a inward direction.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)
-
Constructor Details
-
CoastMask
public CoastMask()
-
-
Method Details
-
getCoastMask
-
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 coaststartPercent
- is the chance for erosion to startspreadChance
- is the chance for an eroding tile to spreadmaxChunks
- is the max number of erosion start eventsmaxStepsPerChunk
- is the maximum number of tiles to change to sea
-