Safe Haskell | None |
---|
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.
- data GameEvent
- update :: GameEvent -> StateT LoggedGame IO ()
- update' :: Maybe (RuleCode -> IO RuleFunc) -> GameEvent -> StateT LoggedGame IO ()
- data LoggedGame = LoggedGame {}
- game :: Lens LoggedGame Game
- gameLog :: Lens LoggedGame [TimedEvent]
- emptyGame :: GameName -> GameDesc -> UTCTime -> Game
- execWithGame :: UTCTime -> State LoggedGame () -> LoggedGame -> LoggedGame
- execWithGame' :: UTCTime -> StateT LoggedGame IO () -> LoggedGame -> IO LoggedGame
- getLoggedGame :: Game -> (RuleCode -> IO RuleFunc) -> [TimedEvent] -> IO LoggedGame
- tracePN :: Monad m => Int -> String -> m ()
- getTimes :: EventHandler -> Maybe UTCTime
- activeRules :: Game -> [Rule]
- pendingRules :: Game -> [Rule]
- rejectedRules :: Game -> [Rule]
- data UInputData
- = URadioData Int
- | UCheckboxData [Int]
- | UTextData String
- | UTextAreaData String
- | UButtonData
Documentation
update :: GameEvent -> StateT LoggedGame IO ()Source
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.
execWithGame' :: UTCTime -> StateT LoggedGame IO () -> LoggedGame -> IO LoggedGameSource
getLoggedGame :: Game -> (RuleCode -> IO RuleFunc) -> [TimedEvent] -> IO LoggedGameSource
activeRules :: Game -> [Rule]Source
pendingRules :: Game -> [Rule]Source
rejectedRules :: Game -> [Rule]Source