antisplice 0.12.3.0 → 0.13.0.1
raw patch · 5 files changed
+19/−3 lines, 5 files
Files
- antisplice.cabal +1/−1
- src/Game/Antisplice.hs +1/−1
- src/Game/Antisplice/Lang.hs +2/−1
- src/Game/Antisplice/Paths.hs +3/−0
- src/Game/Antisplice/Utils/BST.hs +12/−0
antisplice.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.12.3.0+version: 0.13.0.1 -- A short (one-line) description of the package. synopsis: An engine for text-based dungeons.
src/Game/Antisplice.hs view
@@ -75,4 +75,4 @@ import Control.Monad.Error.Class -- | A dungeon constructor function-type Constructor = forall m.(Functor m,ExtendedPrinter m,MonadExpand m,ExpanderEnv m,MonadAtoms m,MonadClock m,MonadVocab m,MonadError SplErr m,MonadDungeon m) => m ()+type Constructor a = forall m.(Functor m,ExtendedPrinter m,MonadExpand m,ExpanderEnv m,MonadAtoms m,MonadClock m,MonadVocab m,MonadError SplErr m,MonadDungeon m) => m a
src/Game/Antisplice/Lang.hs view
@@ -44,6 +44,7 @@ import Text.Printf import Data.Text (unpack) import Data.Maybe+import Data.Char aliases :: [(String,String)] aliases = strictBuild $ do@@ -155,7 +156,7 @@ -- | Run a given input line. act :: String -> ChattyDungeonM () act s = do- ts <- mapM lookupVocab $ replaceAliases $ words s+ ts <- mapM lookupVocab $ replaceAliases $ words $ map toLower s let ss = mergeNouns ts unless (all isIntellegible ss) $ throwError UnintellegibleError case ss of
src/Game/Antisplice/Paths.hs view
@@ -101,3 +101,6 @@ instance Gatifiable ActionAfter where toGate (ActionAfter g) = Gate $ PathState (askAction g) noneM (runAction g)++gatedPath :: (Gatifiable g,MonadDungeon m) => NodeId -> NodeId -> Direction -> g -> m ()+gatedPath f t d g = establishWay f t d (runGate $ toGate g)
src/Game/Antisplice/Utils/BST.hs view
@@ -59,6 +59,18 @@ indexOf (o,_,_,_) = o valueOf (_,a,b,c) = (a,b,c) +instance Ord o => Indexable (o,a,b,c,d) o (a,b,c,d) where+ type IndexOf (o,a,b,c,d) = o+ type ValueOf (o,a,b,c,d) = (a,b,c,d)+ indexOf (o,_,_,_,_) = o+ valueOf (_,a,b,c,d) = (a,b,c,d)++instance Ord o => Indexable (o,a,b,c,d,e) o (a,b,c,d,e) where+ type IndexOf (o,a,b,c,d,e) = o+ type ValueOf (o,a,b,c,d,e) = (a,b,c,d,e)+ indexOf (o,a,b,c,d,e) = o+ valueOf (o,a,b,c,d,e) = (a,b,c,d,e)+ -- | Typeclass for all BSTs that store the given Indexable class Indexable i o v => AnyBST t i o v where -- | Insert into the tree