Apply all world side effects using list

This commit is contained in:
2021-04-09 00:47:41 +02:00
parent feec924d5d
commit c42c5069ea
16 changed files with 106 additions and 82 deletions
+5 -8
View File
@@ -1,9 +1,10 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleInstances #-}
-- | deals with placement of objects within the world
-- after they have had their coordinates set by the layout
module Dodge.LevelGen
( module Dodge.LevelGen
, cutWalls
-- , createInnerWalls
, pairsToGraph
, makeButton
, makeSwitch
@@ -13,7 +14,6 @@ module Dodge.LevelGen
import Dodge.Data
import Dodge.Base
import Dodge.Room.Data
import Dodge.LevelGen.Block
import Dodge.LevelGen.LineBlock
import Dodge.LevelGen.Pathing
@@ -21,24 +21,21 @@ import Dodge.LevelGen.StaticWalls
import Dodge.LevelGen.AutoDoor
import Dodge.LevelGen.TriggerDoor
import Dodge.LevelGen.Switch
import Dodge.LevelGen.Data
import Geometry
import Picture
import System.Random
import Control.Monad.State
import Data.List
import Data.Function
import Control.Applicative
import Control.Lens
import Data.List
import Data.Function
import Data.Maybe
import qualified Data.IntMap.Strict as IM
import qualified Data.Set as S
import qualified Data.Map as M
-- deals with placement of objects within the world
-- after they have had their coordinates set by the layout
placeSpots :: [PlacementSpot] -> World -> World
placeSpots pss w = foldr placeSpot w basicPlacements