Commit graph

15 commits

Author SHA1 Message Date
Torben
397d925110
DEV-765 pipeline refactor (#64)
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.
2022-03-16 16:58:05 -07:00
Rob O'Dwyer
31faba642c
Add missing ruleset params to request body and --debug-requests option (#55)
* 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>
2021-09-07 14:58:10 -07:00
Rob O'Dwyer
015b681f14
DEV-280: Extract board generation out of rules.Ruleset (#51)
* extract board generation out of rules.Ruleset

* update comment and remove redundant interface check

* clone boardState in constrictor to respect the ModifyBoardState interface
2021-08-23 17:13:58 -07:00
Rob O'Dwyer
e416384007
Refactor RoyaleRuleset and move hazard damage into StandardRuleset (#50)
* move hazard damage into StandardRuleset

* OutOfBounds -> Hazards

* remove "out of bounds" in comment

* add cases for eating food to hazard damage test
2021-08-17 16:47:06 -07:00
bvanvugt
72a74a9628 Remove ruleset versions for GitHub release version (future). 2021-07-02 20:09:55 -07:00
John Oram
f31bdff4b8
add ruleset data to the calls made by the cli (name and version) (#32)
* add ruleset data to the cli (name and version)
* remove double ruleset tracking with royale mode
2021-07-02 20:00:19 -07:00
bvanvugt
accb598e29 Add RulesetError test case.
Remove old comments.
2020-12-11 10:05:19 -08:00
md-hexdrive
2cbf8884bf
Add new constants for standard ruleset errors, resolves #5 (#24)
* Convert errors to constant error interfaces.
2020-12-11 09:50:52 -08:00
Brad Van Vugt
68043109a5 Fix function name and interface tests. 2020-05-17 14:38:39 -07:00
Brad Van Vugt
71fc6bf503 Add game over detection to each ruleset. 2020-05-17 14:22:09 -07:00
Brad Van Vugt
44b6b94666
Add TeamRuleset (#13)
This builds on work done by @dlsteuer in #10
2020-02-20 10:24:44 -08:00
Brad Van Vugt
8153585f57
Add "EliminatedBy" to snake eliminations. (#11)
* 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>
2020-02-19 11:44:48 -08:00
Brad Van Vugt
7854e11e51 Package name rulesets -> rules. 2020-01-05 17:08:05 -08:00
bvanvugt
010b3aa08f Rename consts, remove pointers where not wanted/needed, snake placement tests. 2020-01-02 16:10:33 -08:00
Brad Van Vugt
d477201b1e
Rename models.go to ruleset.go 2020-01-01 17:22:16 -08:00
Renamed from models.go (Browse further)