* remove squad support and switch to using pipelines only in RulesBuilder
* remove spawn_food.standard from legacy ruleset definitions
* bugfix: Royale map generates Standard food
* add maps support to CLI
* add automated tests for all registered GameMap implementations
* update README
* 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
* add a new "pipeline" concept
- added new Pipeline type which is a series of stages
- added a global registry to facilitate plugin architecture
- 100% test coverage
* Refactor rulesets to provide and use Pipeline
* fix copypasta comments
* fix lint for unused method
* include game over stages in ruleset pipelines
* clean up unused private standard methods
* remove unused private methods in squad ruleset
* remove unused private methods in royale ruleset
* refactor: pipeline clone + return next board state
* YAGNI: remove unused Append
* refactor: improve stage names
* add no-op behavior to stages for initial state
* refactor: no-op decision within stage functions
* remove misleading comment that isn't true
* dont bother checking for init in gameover stages
* remove redundant test
* refactor: provide a combined ruleset/pipeline type
* fix: movement no-op for GameOver check
IsGameOver needs to run pipeline, move snakes needs to no-op for that
* add test coverage
* refactor: improve stage names and use constants
* add Error method
Support error checking before calling Execute()
* update naming to be American style
* panic when overwriting stages in global registry
* rename "Error" method and improve docs
* use testify lib for panic assertion
* remove redundant food stage
* use ruleset-specific logic for game over checks
* re-work Pipeline errors
* rework errors again
* add defensive check for zero length snake
* use old logic which checks current state, not next
* add warning about how PipelineRuleset checks for game over
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.
* 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
* add eliminated by
* add test
* make sure largest snake is listed as eliminator on head to head collisions
* remove unused type def
* Reduce memory usage during elimination checks.
Co-authored-by: Daniel Steuernol <dlsteuer@gmail.com>