antisplice-0.17.1.0: An engine for text-based dungeons.

Safe HaskellNone
LanguageHaskell2010

Game.Antisplice.Paths

Description

Some utility functions for constructing paths between rooms.

Synopsis

Documentation

unipath :: MonadDungeon m => NodeId -> NodeId -> Direction -> m () Source

A one-way path from f to t.

bipath :: MonadDungeon m => NodeId -> NodeId -> Direction -> m () Source

A mutual path. The specified direction is for the path from f to t, the opposite one is chosen for t to f.

guardedPath :: MonadDungeon m => NodeId -> NodeId -> Direction -> Prerequisite -> m () Source

A unipath that is guarded by a prerequisite.

newtype Gate Source

A composable wrapper for a path state

Constructors

Gate 

Fields

runGate :: PathState
 

class Gatifiable g where Source

Typeclass for everything that may be converted to a gate.

Methods

toGate :: g -> Gate Source