From 4ef19aa35a6d63a8d9f7b6a7a11ac82c2a525783 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 31 Aug 2019 13:17:27 -0400 Subject: Add entities, and allow walking around Add support for entities via a port of the EntityMap type, and implement command support starting at basic hjkl. --- src/Xanthous/Entities/Character.hs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/Xanthous/Entities/Character.hs (limited to 'src/Xanthous/Entities/Character.hs') diff --git a/src/Xanthous/Entities/Character.hs b/src/Xanthous/Entities/Character.hs new file mode 100644 index 000000000000..5cf397e82232 --- /dev/null +++ b/src/Xanthous/Entities/Character.hs @@ -0,0 +1,21 @@ +module Xanthous.Entities.Character + ( Character(..) + , mkCharacter + ) where + +import Xanthous.Prelude +import Test.QuickCheck + +import Xanthous.Entities + +data Character where + Character :: Character + deriving stock (Show, Eq, Ord, Generic) + deriving anyclass (CoArbitrary, Function) + deriving Draw via (DrawCharacter "@" Character) + +instance Arbitrary Character where + arbitrary = pure Character + +mkCharacter :: Character +mkCharacter = Character -- cgit 1.4.1