swarm-0.6.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Game.Step.Validate

Description

Facilities for running a game state until completion, checking for any errors encountered. This is not used for normal gameplay but can be used by e.g. integration tests.

Synopsis

Documentation

playUntilWin :: StateT GameState IO (Either (NonEmpty Text) TickNumber) Source #

Keep stepping a GameState until completion, returning the number of ticks taken if successful, or any bad error messages encountered.

badErrorsInLogs :: GameState -> [Text] Source #

Extract any bad error messages from robot logs or the global message queue, where "bad" errors are either fatal errors or ones referring to issues in the issue tracker.