Continue placement refactor

This commit is contained in:
2021-09-28 15:44:32 +01:00
parent b8af2ce9d8
commit 6b937b115e
10 changed files with 46 additions and 78 deletions
+5 -9
View File
@@ -49,16 +49,12 @@ data PlacementSpot = PS
, _psRot :: Float
, _psType :: PSType
}
data Placement
= SimplePlacement {_placementSpot :: PlacementSpot }
| IDPlacement {_placementSpot :: PlacementSpot, _idPlacement :: Int -> Placement }
-- | GroupedPlacement
-- {_groupPlacementID :: Int
-- ,_groupUpdate :: World -> [Placement] -> World
-- ,_placementSpot :: PlacementSpot
-- }
data Placement = Placement
{ _placementSpot :: PlacementSpot
, _idPlacement :: Int -> Maybe Placement
}
sPS :: Point2 -> Float -> PSType -> Placement
sPS p a = SimplePlacement . PS p a
sPS p a pt = Placement (PS p a pt) (const Nothing)
makeLenses ''PSType
makeLenses ''PlacementSpot
makeLenses ''Placement