License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Utilities to check whether conditions are met for a game win/loss.
Synopsis
- didWin :: ObjectiveCompletion -> Bool
- didLose :: ObjectiveCompletion -> Bool
- isPrereqsSatisfied :: ObjectiveCompletion -> Objective -> Bool
- isUnwinnablePrereq :: Set ObjectiveLabel -> Prerequisite ObjectiveLabel -> Bool
- isUnwinnable :: ObjectiveCompletion -> Objective -> Bool
- partitionActiveObjectives :: ObjectiveCompletion -> ([Objective], [Objective])
- getActiveObjectives :: ObjectiveCompletion -> [Objective]
- data PrereqSatisfaction = PrereqSatisfaction {}
- getSatisfaction :: ObjectiveCompletion -> [PrereqSatisfaction]
Documentation
didWin :: ObjectiveCompletion -> Bool Source #
We have "won" if all of the "unwinnable" or remaining "incomplete" objectives are "optional".
didLose :: ObjectiveCompletion -> Bool Source #
We have "lost" if any of the "unwinnable" objectives are not "optional".
isUnwinnable :: ObjectiveCompletion -> Objective -> Bool Source #
partitionActiveObjectives :: ObjectiveCompletion -> ([Objective], [Objective]) Source #
The first element of the returned tuple consists of "active" objectives, the second element "inactive".
data PrereqSatisfaction Source #
For debugging only (via Web API)
PrereqSatisfaction | |
|
Instances
getSatisfaction :: ObjectiveCompletion -> [PrereqSatisfaction] Source #
Used only by the web interface for debugging