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

Safe HaskellNone

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 whereSource

Typeclass for everything that may be converted to a gate.

Methods

toGate :: g -> GateSource