about summary refs log tree commit diff
path: root/src/Xanthous/Game
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-01-03T17·41-0500
committerGriffin Smith <root@gws.fyi>2020-01-03T17·41-0500
commit1b88921bc36e5da1ade5c52827d057dc2be65bc5 (patch)
treed731dffc16929213becf34105406b56906118a07 /src/Xanthous/Game
parentc4351d46ef13da5fbe2048bb3506f9549b61f437 (diff)
Decouple Gormlak AI from creatures
Decouple the definition of the Gormlak AI from the creature type itself
using generic lenses and a "HasVisionRadius" typeclass, to begin to
untangle the hs-boot web of circular dependencies. This
actually *increases* the number of hs-boot files from 1 to 2, but both
of the source imports that use them are single-instance (unlike gormlak
AI which I would expect to grow linearly with the growth of the game),
plus at least one should be able to go away once we remove collision
from the game lenses module and move it into something defined in the
entity class itself.
Diffstat (limited to 'src/Xanthous/Game')
-rw-r--r--src/Xanthous/Game/Lenses.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xanthous/Game/Lenses.hs b/src/Xanthous/Game/Lenses.hs
index 4a080f85f017..580435a0688b 100644
--- a/src/Xanthous/Game/Lenses.hs
+++ b/src/Xanthous/Game/Lenses.hs
@@ -27,9 +27,9 @@ import qualified Xanthous.Data.EntityMap as EntityMap
 import           Xanthous.Data.EntityMap.Graphics (visiblePositions)
 import           Xanthous.Entities.Character (Character, mkCharacter)
 import           Xanthous.Entities.Environment (Door, open, GroundMessage)
-import           Xanthous.Entities.Item (Item)
-import           Xanthous.Entities.Creature (Creature)
-import           Xanthous.Entities.Entities ()
+import            Xanthous.Entities.Item (Item)
+import           {-# SOURCE #-} Xanthous.Entities.Creature (Creature)
+import           {-# SOURCE #-} Xanthous.Entities.Entities ()
 --------------------------------------------------------------------------------
 
 getInitialState :: IO GameState