License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Types and records for updating and retrieving the best scores for a scenario.
Synopsis
- data BestByCriteria
- describeCriteria :: BestByCriteria -> Text
- data ProgressStats = ProgressStats {}
- scenarioStarted :: Lens' ProgressStats ZonedTime
- scenarioAttemptMetrics :: Lens' ProgressStats AttemptMetrics
- type ProgressMetric = Metric ProgressStats
- data BestRecords = BestRecords {}
- emptyBest :: ZonedTime -> BestRecords
- updateBest :: ProgressMetric -> BestRecords -> BestRecords
- scenarioBestByTime :: Lens' BestRecords ProgressMetric
- scenarioBestByTicks :: Lens' BestRecords ProgressMetric
- scenarioBestByCharCount :: Lens' BestRecords ProgressMetric
- scenarioBestByAstSize :: Lens' BestRecords ProgressMetric
- getBestGroups :: BestRecords -> [(Metric ProgressStats, NonEmpty BestByCriteria)]
Some orphan ZonedTime instances
High scores by various criteria
data BestByCriteria Source #
Instances
data ProgressStats Source #
ProgressStats | |
|
Instances
type ProgressMetric = Metric ProgressStats Source #
High scores by various criteria
data BestRecords Source #
Instances
emptyBest :: ZonedTime -> BestRecords Source #
updateBest :: ProgressMetric -> BestRecords -> BestRecords Source #
scenarioBestByTime :: Lens' BestRecords ProgressMetric Source #
The best status of the scenario, measured in real world time.
scenarioBestByTicks :: Lens' BestRecords ProgressMetric Source #
The best status of the scenario, measured in game ticks.
scenarioBestByCharCount :: Lens' BestRecords ProgressMetric Source #
The best code size of the scenario, measured in character count.
scenarioBestByAstSize :: Lens' BestRecords ProgressMetric Source #
The best code size of the scenario, measured in AST size.
getBestGroups :: BestRecords -> [(Metric ProgressStats, NonEmpty BestByCriteria)] Source #
Uses the start time of the play-attempt to de-dupe records that are from the same game. The start time should be sufficient to uniquely identify a game.