Make Placement into a product type
This commit is contained in:
@@ -33,19 +33,9 @@ placeSpot (w, rm) plmnt = case plmnt of
|
||||
Placement{_plSpot = PSPos extract eff fallback} ->
|
||||
placeSpotUsingLink w rm plmnt extract eff fallback
|
||||
Placement{} -> placePlainPSSpot w rm plmnt shift
|
||||
RandomPlacement rplmnt -> placeRandomPlacement rplmnt w rm
|
||||
where
|
||||
shift = _rmShift rm
|
||||
|
||||
placeRandomPlacement ::
|
||||
State StdGen Placement ->
|
||||
GenWorld ->
|
||||
Room ->
|
||||
((GenWorld, Room), [Placement])
|
||||
placeRandomPlacement rplmnt w rm = placeSpot (w & gwWorld . randGen .~ g, rm) plmnt'
|
||||
where
|
||||
(plmnt', g) = runState rplmnt (_randGen (_gwWorld w))
|
||||
|
||||
placePlainPSSpot ::
|
||||
GenWorld ->
|
||||
Room ->
|
||||
|
||||
Reference in New Issue
Block a user