| License | BSD-3-Clause |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
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
- playUntilWin :: StateT GameState IO (Either (NonEmpty Text) TickNumber)
- badErrorsInLogs :: GameState -> [Text]
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.