Cleanup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--{-# LANGUAGE LambdaCase #-}
|
||||
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
|
||||
--{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
|
||||
|
||||
{- | deals with placement of objects within the world
|
||||
after they have had their coordinates set by the layout
|
||||
@@ -174,13 +174,10 @@ placeChasm gw rid ps shiftps =
|
||||
-- where
|
||||
-- (evaluatedType, g) = runState rgen (_randGen $ _gwWorld w)
|
||||
|
||||
-- this function is the reason for the warning suppression
|
||||
-- remove the warning suppression if it changes
|
||||
placeWallPoly :: [Point2] -> Wall -> World -> World
|
||||
placeWallPoly qs wl w = foldl' (addPane wl) w pairs
|
||||
where
|
||||
(p : ps) = orderPolygon qs
|
||||
pairs = zip (ps ++ [p]) (p : ps)
|
||||
placeWallPoly qs wl w
|
||||
| (p : ps) <- orderPolygon qs = foldl' (addPane wl) w $ zip (ps ++ [p]) (p : ps)
|
||||
| otherwise = error "tried to place wall poly with too few points"
|
||||
|
||||
addPane :: Wall -> World -> (Point2, Point2) -> World
|
||||
addPane wl w l =
|
||||
|
||||
Reference in New Issue
Block a user