* reorganize code
* first draft of map generator interfaces
* add explicit random interface to board helpers
* implement standard map
* rename Generator to GameMap
* allow initializing snakes separately from placing them
* add random number generator to Settings
* updates to GameMap interface
* add helpers for creating and updating BoardState with maps
- Update usage section in the README with the latest flags.
- Update default sample output (BoardState fields have changed,
OutOfBounds has been removed).
- Add section describing options for getting JSON output with the
`--output` and `--debug-requests` flag.
Refactor rulesets into smaller composable operations
In order to mix up the functionality from different rulesets like Solo, Royale, etc. the code in these classes needs to be broken up into small functions that can be composed in a pipeline to make a custom game mode.
* New flag -c to use colors in the cli board view
* Error handeling
* Fix formatting
* Extracted ANSI escape codes into a different file
* Fixed formatting
* Initial addition of a game exporter
* Fix snake state bug, remove test logs, fix final output line being empty
* Ignore test JSONL file
* Added explanation for design decision on the you key in SnakeResponse
* Adjust gitignore to be more generic
* Retain consistency in usage of pointer
* Re-word explanation to refer to requests instead of responses
* Remove unnecessary nil check
* Check error returned by WriteString
* Change file permissions for output file
* Initialise gameexporter regardless of whether output is requested
* Print error and exit if export to file fails
* Added another comment explaining reasoning around export checks
* Fixed broken test due to changed return type
* move snake API structs into a new client package
* add customizations to snake objects
* refactor and add support for passing snake customizations in games
* fix sending of new params
* add royale and squad settings to requests
* add --debug-requests option
* update test for request body and add helper
Co-authored-by: Penelope Phippen <penelope@hey.com>
* extract board generation out of rules.Ruleset
* update comment and remove redundant interface check
* clone boardState in constrictor to respect the ModifyBoardState interface
* move hazard damage into StandardRuleset
* OutOfBounds -> Hazards
* remove "out of bounds" in comment
* add cases for eating food to hazard damage test