Add forgotten files, many updates concerning turrets and shields
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
module Dodge.Wall.Move
|
||||
where
|
||||
import Dodge.Data
|
||||
import Geometry
|
||||
import Dodge.Wall.Zone
|
||||
|
||||
import Control.Lens
|
||||
moveWallID :: Int -> (Point2,Point2) -> World -> World
|
||||
moveWallID wlid wlline w = case w ^? walls . ix wlid of
|
||||
Nothing -> w
|
||||
Just wl -> moveWall wlid wl wlline w
|
||||
moveWall :: Int -> Wall -> (Point2,Point2) -> World -> World
|
||||
moveWall wlid wl wlline w = w & walls . ix wlid .~ newwl
|
||||
& deleteWallFromZones wl
|
||||
& insertWallInZones newwl
|
||||
where
|
||||
newwl = wl {_wlLine = wlline}
|
||||
Reference in New Issue
Block a user