In the fall me and Jonathan worked on an update to the Engine
specifically with SnailMode in mind, and refactored SnailMode to use
this new `PreUpdate` method
This allowed us to not have to use off-board hazards as state!
However we want to use Snail Mode for our first Community Tournament!
And the web engine doesn't support PreUpdate yet, so we are reverting
Snail Mode to its old Pre-PreUpdate version :lol:
* DEV-1761: Clean up Ruleset interface (#115)
* remove legacy ruleset types and simplify ruleset interface
* remove unnecessary settings argument from Ruleset interface
* decouple rules.Settings from client API and store settings as strings
* DEV 1761: Add new BoardState and Point fields (#117)
* add Point.TTL, Point.Value, GameState and PointState to BoardState
* allow maps to access BoardState.GameState,PointState
* add PreUpdateBoard and refactor snail_mode with it
* fix bug where an extra turn was printed to the console
* fix formatting
* fix lint errors
Co-authored-by: JonathanArns <jonathan.arns@googlemail.com>
* add utility methods to Editor and BoardStateEditor
* add Meta.Validate
* allow setting Meta.MinPlayers to zero
* remove uints in map sizes
* use Meta.Validate in HazardPitsMap
* ensure /end request is always called, and refactor win/draw logic
* clean up logging and error handling during initialization
* automatically generate friendly snake names
* title-case snake names
* print out list of alive snake names instead of count
* log snake names, IDs, and URLs at startup
* print out state for turn zero
* added the new hazard map with custom start locations
* tweaked comments/logic
* cleaning up functionality
* unit test plus bug fixes
* fixing unnecessary error
* castle_wall map
Wall of hazards around the board with dangerous bridges.
- add support for all standard board sizes
- hazard placement for all board sizes
* passage food placement for all board sizes
* 4 snake starting positions for all maps
* only one food can spawn on a bridge
* support 8 snakes for all board sizes
support 12 snakes on XLarge and XXLarge board sizes
* max 2 food sm/med/lg and max 4 food on xlg/xxlg
no food in the first 10 turns
* sort generated hazard positions
* remove 'uninteresting' castle wall map board sizes
* refactor castle wall map to align with #103
* align map castle wall meta Name with ID
* set MinPlayers to 1 for castle wall map
* pass max snake/food and startPosition to priv func
* fix castle wall food placement and refactor tests
* avoid food spawn by snake heads on castle wall map
- fixes forced food spawning infront of snake issue on large & xlarge maps with double walls
* Add snail-mode map
* snail-mode: cap max hazards to 7
- Ensure that no more than 7 hazards are added to a square. This
fixes a bug where some squares were getting way too many hazards
applied to them. There must be some other bug at work here as
well.
- Change author names to be github usernames instead of first names
* snail-mode: fix bug with eliminated snakes
- Ensure that hazard snail-trail is not added for eliminated snakes
* Update from Stream July 31
Added comments to most functions and important bits of code
Also changed the map so that instead of a fixed number of 7 hazards,
we add hazards equal to the length of the snake.
* snail-mode: add TAG_EXPERIMENTAL and TAG_HAZARD_PLACEMENT
* snail-mode: use Point as map key
Co-authored-by: Corey Alexander <coreyja@gmail.com>
* Separated out rivers and bridges into its own file with three map variants
* fixing tags
* removed extra 4 starting positions from the medium map since it only supports 8 players
* update GetUnoccupiedPoints to consider hazards with a flag
* use new utility method to fine unoccupied points and enforce map sizes
* changed up casting to make IsAllowable() more usable
* add 'map' cli command
- provides the following map information functions:
- list all available maps in the global registry
- display map metadata
- update docs with map command examples
* add list and info subcommands to map cli command
* rename map command list and info factory functions
* add --all flag to map info subcommand
* handle cmd.Help error