Grass is back, bettered mountains

This commit is contained in:
Jonas Betzendahl 2014-05-16 11:39:29 +02:00
parent f2fbf101ef
commit 1c1aedda30

View File

@ -54,7 +54,7 @@ heightToTerrain :: MapType -> YCoord -> TileType
heightToTerrain GrassIslandMap y
| y < 0.1 = Ocean
| y < 0.2 = Beach
| y < 1 = Grass
| y < 1.5 = Grass
| y < 3 = Hill
| otherwise = Mountain
heightToTerrain _ _ = undefined
@ -77,7 +77,7 @@ gaussMountain seed mp = aplByPlace (liftUp c) (\(_,_) -> True) mp
gs = map mkStdGen (map (*seed) [1..])
c = let ((a,b), (x,y)) = bounds mp in (head (randomRs (a,x) (gs !! 0)), (head (randomRs (b,y) (gs !! 1))))
amp = head $ randomRs ((2.0, 5.0) :: (Float, Float)) (gs !! 2)
sig = head $ randomRs ((1.0, 15.0) :: (Float, Float)) (gs !! 3)
sig = head $ randomRs ((2.0, 8.0) :: (Float, Float)) (gs !! 3)
htt = heightToTerrain
-- TODO: Fix Lambda to True with sensible function, maybe rework giveNeighbourhood in Map.Map