Add random floor tiles to floors

This commit is contained in:
2021-06-16 00:14:18 +02:00
parent da631e3b37
commit 29902b6f22
10 changed files with 76 additions and 16 deletions
+15
View File
@@ -0,0 +1,15 @@
module Dodge.Room.AddTile
where
import Dodge.Room.Data
import Tile
import Geometry
import Control.Lens
addTile :: Float -> Room -> Room
addTile z r
| not (null (_rmFloor r)) || null rp = r
| otherwise = r & rmFloor .~ [oTile poly z]
where
rp = _rmPolys r
poly = convexHull $ concat rp