Grass is back, bettered mountains
This commit is contained in:
parent
f2fbf101ef
commit
1c1aedda30
@ -54,7 +54,7 @@ heightToTerrain :: MapType -> YCoord -> TileType
|
|||||||
heightToTerrain GrassIslandMap y
|
heightToTerrain GrassIslandMap y
|
||||||
| y < 0.1 = Ocean
|
| y < 0.1 = Ocean
|
||||||
| y < 0.2 = Beach
|
| y < 0.2 = Beach
|
||||||
| y < 1 = Grass
|
| y < 1.5 = Grass
|
||||||
| y < 3 = Hill
|
| y < 3 = Hill
|
||||||
| otherwise = Mountain
|
| otherwise = Mountain
|
||||||
heightToTerrain _ _ = undefined
|
heightToTerrain _ _ = undefined
|
||||||
@ -77,7 +77,7 @@ gaussMountain seed mp = aplByPlace (liftUp c) (\(_,_) -> True) mp
|
|||||||
gs = map mkStdGen (map (*seed) [1..])
|
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))))
|
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)
|
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
|
htt = heightToTerrain
|
||||||
|
|
||||||
-- TODO: Fix Lambda to True with sensible function, maybe rework giveNeighbourhood in Map.Map
|
-- TODO: Fix Lambda to True with sensible function, maybe rework giveNeighbourhood in Map.Map
|
||||||
|
Loading…
Reference in New Issue
Block a user