diff options
author | Griffin Smith <root@gws.fyi> | 2019-09-20T17·14-0400 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2019-09-20T23·38-0400 |
commit | 4db3a68efec079bdb8723f377929bfa05860bdc2 (patch) | |
tree | 2ed2ef7c8b20f285703a9fb0c1e639faf70a075d /src/Xanthous/Entities/Creature.hs | |
parent | 7770ed05484a8a7aae4d5d680a069a0886a145dd (diff) |
Add doors and an open command
Add a Door entity and an Open command, which necessitated supporting the direction prompt. Currently nothing actually puts doors on the map, which puts a slight damper on actually testing this out.
Diffstat (limited to 'src/Xanthous/Entities/Creature.hs')
-rw-r--r-- | src/Xanthous/Entities/Creature.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Xanthous/Entities/Creature.hs b/src/Xanthous/Entities/Creature.hs index 024859473f21..b59cceab4045 100644 --- a/src/Xanthous/Entities/Creature.hs +++ b/src/Xanthous/Entities/Creature.hs @@ -12,6 +12,7 @@ module Xanthous.Entities.Creature import Xanthous.Prelude -------------------------------------------------------------------------------- import Data.Word +import Test.QuickCheck.Arbitrary.Generic -------------------------------------------------------------------------------- import Xanthous.Entities.RawTypes hiding (Creature) import Xanthous.Entities (Draw(..), Entity(..), DrawRawChar(..)) @@ -25,6 +26,9 @@ data Creature = Creature deriving Draw via DrawRawChar "_creatureType" Creature makeLenses ''Creature +instance Arbitrary Creature where + arbitrary = genericArbitrary + instance Entity Creature where blocksVision _ = False |