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

Safe HaskellNone

Language.Nomyx.Game

Description

This module implements Game management. a game is a set of rules, and results of actions made by players (usually vote results) the module manages the effects of rules over each others.

Synopsis

Documentation

data LoggedGame Source

Constructors

LoggedGame 

Fields

_game :: Game
 
_gameLog :: [TimedEvent]
 

gameLog :: Lens LoggedGame [TimedEvent]Source

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

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

getLoggedGame :: Game -> (RuleCode -> IO RuleFunc) -> [TimedEvent] -> IO LoggedGameSource

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