Cleanup launchers

This commit is contained in:
2022-03-02 08:36:16 +00:00
parent b3ba0697b4
commit be1fda266a
7 changed files with 44 additions and 60 deletions
+3
View File
@@ -100,6 +100,9 @@ allWalls = IM.unions . concatMap IM.elems . IM.elems . _znObjects . _wallsZone
creatureNearPoint :: Point2 -> World -> Maybe Creature
creatureNearPoint p = L.fold (L.minimumOn (dist p . _crPos)) . creaturesNearPoint p
creatureNearPointI :: Int -> Point2 -> World -> Maybe Creature
creatureNearPointI n p = L.fold (L.minimumOn (dist p . _crPos)) . creaturesNearPointI n p
creaturesNearPoint :: Point2 -> World -> IM.IntMap Creature
creaturesNearPoint p w = IM.unions
[f b $ f a $ _znObjects $ _creaturesZone w | a<-[x-1,x,x+1] , b<-[y-1,y,y+1]]