Commit before placement refactor
This commit is contained in:
@@ -14,8 +14,9 @@ module Dodge.LevelGen.Data
|
||||
, pwPoly
|
||||
, pwWall
|
||||
, unPutCrit
|
||||
, groupPlacementID
|
||||
, groupUpdate
|
||||
-- , groupPlacementID
|
||||
-- , groupUpdate
|
||||
, idPlacement
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Picture
|
||||
@@ -49,14 +50,15 @@ data PlacementSpot = PS
|
||||
, _psType :: PSType
|
||||
}
|
||||
data Placement
|
||||
= SinglePlacement {_placementSpot :: PlacementSpot }
|
||||
| GroupedPlacement
|
||||
{_groupPlacementID :: Int
|
||||
,_groupUpdate :: World -> [Placement] -> World
|
||||
,_placementSpot :: PlacementSpot
|
||||
}
|
||||
= SimplePlacement {_placementSpot :: PlacementSpot }
|
||||
| IDPlacement {_placementSpot :: PlacementSpot, _idPlacement :: Int -> Placement }
|
||||
-- | GroupedPlacement
|
||||
-- {_groupPlacementID :: Int
|
||||
-- ,_groupUpdate :: World -> [Placement] -> World
|
||||
-- ,_placementSpot :: PlacementSpot
|
||||
-- }
|
||||
sPS :: Point2 -> Float -> PSType -> Placement
|
||||
sPS p a = SinglePlacement . PS p a
|
||||
sPS p a = SimplePlacement . PS p a
|
||||
makeLenses ''PSType
|
||||
makeLenses ''PlacementSpot
|
||||
makeLenses ''Placement
|
||||
|
||||
Reference in New Issue
Block a user