about summary refs log tree commit diff
path: root/src/Xanthous/App.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/App.hs')
-rw-r--r--src/Xanthous/App.hs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs
index cff4a4d611e3..1632c39e586d 100644
--- a/src/Xanthous/App.hs
+++ b/src/Xanthous/App.hs
@@ -57,11 +57,6 @@ makeApp = pure $ Brick.App
 runAppM :: AppM a -> GameState -> EventM Name a
 runAppM appm = fmap fst . runAppT appm
 
--- testGormlak :: Creature
--- testGormlak =
---   let Just (Creature gormlak) = raw "gormlak"
---   in Creature.newWithType gormlak
-
 startEvent :: AppM ()
 startEvent = do
   initLevel
@@ -264,20 +259,3 @@ attackAt pos =
         say ["combat", "hit"] msgParams
         entities . ix creatureID . positioned .= SomeEntity creature'
     stepGame
-
-data Collision
-  = Stop
-  | Combat
-  deriving stock (Show, Eq, Ord, Generic)
-  deriving anyclass (NFData)
-
-collisionAt :: MonadState GameState m => Position -> m (Maybe Collision)
-collisionAt pos = do
-  ents <- use $ entities . EntityMap.atPosition pos
-  pure $
-    if | null ents -> Nothing
-       | any (entityIs @Creature) ents -> pure Combat
-       | all (entityIs @Item) ents -> Nothing
-       | doors@(_ : _) <- ents ^.. folded . _SomeEntity @Door
-       , all (view open) doors -> Nothing
-       | otherwise -> pure Stop