swarm-0.3.0.1: 2D resource gathering game with programmable robots
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Game.Scenario.Objective.WinCheck

Description

Utilities to check whether conditions are met for a game win/loss.

Synopsis

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 not "optional".

partitionActiveObjectives :: ObjectiveCompletion -> ([Objective], [Objective]) Source #

The first element of the returned tuple consists of "active" objectives, the second element "inactive".

getSatisfaction :: ObjectiveCompletion -> [PrereqSatisfaction] Source #

Used only by the web interface for debugging