AI refactor

This commit is contained in:
jgk
2021-05-14 12:04:12 +02:00
parent 2dd3756682
commit 0b26761be5
14 changed files with 282 additions and 762 deletions
+9 -7
View File
@@ -25,17 +25,19 @@ data PSType = PutCrit Creature
| RandPS (State StdGen PSType)
| PutNothing
| PutID { _putID :: Int}
| CollectivePS
{ _collectiveID :: Int
, _collectiveNum :: Int
, _collectiveFunction :: [Int] -> State StdGen [PSType]
}
| LabelPS { _psLabel :: Int, _ps :: PSType}
data PlacementSpot = PS
{ _psPos :: Point2
, _psRot :: Float
, _psType :: PSType
}
data Placement
= SinglePlacement {_placementSpot :: PlacementSpot }
| GroupedPlacement
{_groupPlacementID :: Int
,_groupPlacementFunc :: [PlacementSpot] -> PlacementSpot -> PlacementSpot
,_placementSpot :: PlacementSpot
}
makeLenses ''PSType
makeLenses ''PlacementSpot
makeLenses ''Placement