Move towards implementing wrist shields

This commit is contained in:
2022-05-25 10:27:05 +01:00
parent 546c279fae
commit dccbca5cfc
8 changed files with 131 additions and 44 deletions
+7
View File
@@ -1,6 +1,7 @@
{-# LANGUAGE BangPatterns #-}
module Dodge.Wall.Move
( moveWallID
, moveWallIDUnsafe
, moveWall
, moveWallIDToward
, mvPs
@@ -12,6 +13,12 @@ import Dodge.Wall.Zone
import Control.Lens
import qualified Data.IntMap.Strict as IM
moveWallIDUnsafe :: Int -> (Point2,Point2) -> World -> World
moveWallIDUnsafe wlid wlline w = case w ^? walls . ix wlid of
Nothing -> error "tried moving nonexistant wall"
Just wl -> moveWall wlid wl wlline w
moveWallID :: Int -> (Point2,Point2) -> World -> World
moveWallID wlid wlline w = case w ^? walls . ix wlid of
Nothing -> w