Improve wall crushing

This commit is contained in:
2026-03-28 21:43:06 +00:00
parent 2db4e9bc6e
commit 08fcc4baab
12 changed files with 176 additions and 106 deletions
+2 -2
View File
@@ -21,9 +21,9 @@ moveWallID wlid wlline w = case w ^? cWorld . lWorld . walls . ix wlid of
Just wl -> moveWall wlid wl wlline w
moveWall :: Int -> Wall -> (Point2, Point2) -> World -> World
moveWall wlid wl wlline w =
moveWall wlid wl xy w =
w & cWorld . lWorld . walls . ix wlid .~ newwl
& deleteWallFromZones wl
& insertWallInZones newwl
where
newwl = wl{_wlLine = wlline}
newwl = wl & wlLine .~ xy