LambdaHack-0.5.0.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Atomic.MonadAtomic

Description

Atomic monads for handling atomic game state transformations.

Synopsis

Documentation

class MonadStateRead m => MonadAtomic m where Source

The monad for executing atomic game state transformations.

Minimal complete definition

execAtomic

Methods

execAtomic :: CmdAtomic -> m () Source

Execute an arbitrary atomic game state transformation.

execUpdAtomic :: UpdAtomic -> m () Source

Execute an atomic command that really changes the state.

execSfxAtomic :: SfxAtomic -> m () Source

Execute an atomic command that only displays special effects.

Instances

MonadAtomic SerImplementation

The game-state semantics of atomic commands as computed on the server.

MonadAtomic (CliImplementation resp req)

The game-state semantics of atomic commands as computed on the client.

broadcastUpdAtomic :: MonadAtomic m => (FactionId -> UpdAtomic) -> m () Source

Create and broadcast a set of atomic updates, one for each client.

broadcastSfxAtomic :: MonadAtomic m => (FactionId -> SfxAtomic) -> m () Source

Create and broadcast a set of atomic special effects, one for each client.