Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+7 -7
View File
@@ -1,16 +1,16 @@
module Dodge.Wall.Create
where
import Dodge.Data
import Dodge.Wall.Zone
module Dodge.Wall.Create where
import Control.Lens
import Dodge.Data.World
import Dodge.Wall.Zone
import qualified IntMapHelp as IM
createWall :: Wall -> World -> (Int,World)
createWall wl w = (wlid
createWall :: Wall -> World -> (Int, World)
createWall wl w =
( wlid
, w & cWorld . walls %~ IM.insert wlid newwl
& insertWallInZones newwl
)
where
newwl = wl {_wlID = wlid}
newwl = wl{_wlID = wlid}
wlid = IM.newKey $ _walls (_cWorld w)