Keep track of seen walls in external list
This commit is contained in:
+8
-4
@@ -659,11 +659,15 @@ updateSeenWalls w = foldl' markWallSeen w (map (_wlID . snd) $ allVisibleWalls w
|
||||
-- mw wl = wl {_wlSeen = True}
|
||||
|
||||
markWallSeen :: World -> Int -> World
|
||||
markWallSeen !w !i = w & cWorld . lWorld . walls .~ IM.adjust markSeen i (w ^. cWorld . lWorld . walls)
|
||||
markWallSeen w i = w & cWorld . lWorld . seenWalls . at i .~ Just ()
|
||||
--markWallSeen !w !i = w & cWorld . lWorld . walls %~ IM.adjust markSeen i
|
||||
-- in the past there might have been a space leak, which the following was meant
|
||||
-- to fix
|
||||
--markWallSeen !w !i = w & cWorld . lWorld . walls .~ IM.adjust markSeen i (w ^. cWorld . lWorld . walls)
|
||||
|
||||
markSeen :: Wall -> Wall
|
||||
{-# INLINE markSeen #-}
|
||||
markSeen wl = wl{_wlSeen = True}
|
||||
--markSeen :: Wall -> Wall
|
||||
--{-# INLINE markSeen #-}
|
||||
--markSeen wl = wl{_wlSeen = True}
|
||||
|
||||
checkEndGame :: Universe -> Universe
|
||||
checkEndGame uv = case w ^? cWorld . timeFlow . deathDelay of
|
||||
|
||||
Reference in New Issue
Block a user