Use placement as continutation
This commit is contained in:
+3
-3
@@ -55,7 +55,7 @@ doPartialPlacement im rm w = case _rmPartialPmnt rm of
|
||||
Nothing -> w
|
||||
Just fi -> case _rmTakeFrom rm of
|
||||
Nothing -> w
|
||||
Just i -> fst $ placeSpot (w,rm) (fi (im IM.! i))
|
||||
Just i -> fst $ fst $ placeSpot (w,rm) (fi (im IM.! i))
|
||||
|
||||
doExtendedPlacements :: [Room] -> World -> (IM.IntMap Int, World)
|
||||
doExtendedPlacements rms w = foldr doExtendedPlacement (IM.empty,w) rms
|
||||
@@ -65,10 +65,10 @@ doExtendedPlacement rm (im,w) = case _rmExtendedPmnt rm of
|
||||
Nothing -> (im,w)
|
||||
Just _ -> case _rmLabel rm of
|
||||
Nothing -> (im,w)
|
||||
Just _ -> undefined
|
||||
Just i -> undefined
|
||||
|
||||
doRoomPlacements :: World -> Room -> World
|
||||
doRoomPlacements w rm = fst $ foldl' placeSpot (w,rm) $ _rmPmnts rm
|
||||
doRoomPlacements w rm = fst $ foldl' (\wr -> fst . placeSpot wr) (w,rm) $ _rmPmnts rm
|
||||
|
||||
setupWorldBounds :: World -> World
|
||||
setupWorldBounds w = w
|
||||
|
||||
Reference in New Issue
Block a user