Nomyx-Language-0.4.1: Language to express rules for Nomic

Safe HaskellNone

Language.Nomyx.Engine

Contents

Description

Warning: Nomyx internals (not required to compose rules and play the game) This module implements game engine. the module manages the effects of rules over each others. This module is not required

Synopsis

Game management

data LoggedGame Source

A game being non serializable, we have to store events in parralel in order to rebuild the state latter.

Constructors

LoggedGame 

Fields

_game :: Game
 
_gameLog :: [TimedEvent]
 

data Game Source

The state of the game:

execWithGame :: UTCTime -> State LoggedGame () -> LoggedGame -> LoggedGameSource

A helper function to use the state transformer GameState. It additionally sets the current time.

Variables management

data Var Source

stores the variable's data

Constructors

forall a . (Typeable a, Show a, Eq a) => Var 

Instances

Rules management

Events management

data Status Source

Constructors

SActive 
SDeleted 

Instances

data Log Source

Constructors

Log 

Instances

tracePN :: Monad m => Int -> String -> m ()Source