Improve debris
This commit is contained in:
+3
-3
@@ -162,9 +162,9 @@ updateIMl' fim fup w = foldl' (flip fup) w (fim w)
|
||||
updateBlocks :: World -> World
|
||||
updateBlocks w = foldr f w $ _blocks w
|
||||
where
|
||||
f bl w' = case _blHPs bl of
|
||||
(x:_:_) | x < 1 -> splinterBlock bl w'
|
||||
[x] | x < 1 -> destroyBlock bl w'
|
||||
f bl w' = case _blHP bl of
|
||||
-- x | x < 1 -> splinterBlock bl w'
|
||||
x | x < 1 -> destroyBlock bl w'
|
||||
_ -> w'
|
||||
|
||||
-- | Note the explict use of record syntax. Using lens created a space leak.
|
||||
|
||||
Reference in New Issue
Block a user