Unshadow window blocks when neighbour destroyed

This commit is contained in:
2021-10-27 11:44:09 +01:00
parent 15fac3db6e
commit 8f738410c0
5 changed files with 33 additions and 13 deletions
+6
View File
@@ -29,6 +29,12 @@ import Data.Maybe
takeUntil :: Foldable t => (a -> Bool) -> t a -> [a]
takeUntil p = foldr (\x xs -> x : if p x then [] else xs) []
safeHead :: [a] -> Maybe a
safeHead (x:_) = Just x
safeHead _ = Nothing
you :: World -> Creature
you w = _creatures w IM.! _yourID w