Improve wall crushing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user