mirror of
https://github.com/swarm-game/swarm.git
synced 2024-10-27 10:04:12 +03:00
5165b576ae
This PR introduces an `--autoplay` flag that causes the solution stored in the `solutions` field of a scenario file (which was selected on the command line via the `--scenario` option) to be automatically run when the game starts, identically to the `--run` option. The purpose is to: 1. more easily showcase scenarios to the community 2. facilitate a quick a sanity check that the solution text in the yaml file is correct # Test procedure stack run -- --scenario data/scenarios/Tutorials/conditionals.yaml --autoplay This has the same effect as manually copying the solution stored in `conditionals.yaml` to `myfile.sw`, and then running: stack run -- --scenario data/scenarios/Tutorials/conditionals.yaml --run myfile.sw <a href="https://asciinema.org/a/mGB5VDKhsLLPdrItZWi3qsHUV" target="_blank"><img src="https://asciinema.org/a/mGB5VDKhsLLPdrItZWi3qsHUV.svg" width="640" /></a> |
||
---|---|---|
.. | ||
Main.hs |