Refactor doors

This commit is contained in:
2022-07-24 20:36:27 +01:00
parent 2c1bc67a51
commit d6a94ec4bc
25 changed files with 186 additions and 135 deletions
+3 -2
View File
@@ -12,19 +12,20 @@ data PathGraph = PathGraph
, _pgNodeCount :: Int
, _pgEdgeMap :: Map (V2 Point2) (Int,Int,PathEdge)
}
deriving (Eq,Show,Read)
data PathEdge = PathEdge
{_peStart :: Point2
,_peEnd :: Point2
,_peDist :: Float
,_peObstacles :: Set.Set EdgeObstacle
}
deriving (Eq,Ord,Show)
deriving (Eq,Ord,Show,Read)
data EdgeObstacle
= BlockObstacle
| DoorObstacle
| AutoDoorObstacle
| WallObstacle
deriving (Eq,Ord,Show,Bounded,Enum)
deriving (Eq,Ord,Show,Read,Bounded,Enum)
makeLenses ''PathGraph
makeLenses ''PathEdge