bvanvugt
c6d9ba12ab
Never spawn food within one move of any snake.
2020-11-10 13:00:13 -08:00
Brad Van Vugt
f5aec61e04
Rename "EliminatedByStarvation" > "EliminatedByOutOfHealth"
2020-09-10 12:00:56 -07:00
Brad Van Vugt
92592c2aba
Allow previous game state to include eliminated snakes. Fixes #19 .
2020-09-10 11:49:41 -07:00
Brad Van Vugt
2cb1943463
Add tests to ensure that head-to-heads on food remove the food.
2020-08-31 13:30:09 -07:00
Brad Van Vugt
a342f87ed6
Ensure snakes eating on their last turn survive!
2020-08-31 13:18:03 -07:00
Brad Van Vugt
5aec70de2b
Prioritize self-collisions over other collisions. Fixes #16 .
2020-07-21 17:11:12 -07:00
Brad Van Vugt
d0400fcb18
Always spawn food within two moves of each snake on known board sizes.
2020-07-21 13:43:28 -07:00
sjbcastro
70a8107a6f
Implemented TestCreateNextBoardState ( #15 )
2020-05-28 11:26:44 -07:00
sjbcastro
2d62a58c9b
Made snakes spawn on odd or even diagonal points ( #14 ). Fixes #12 .
...
Randomly placed snakes will now always spawn on "even" squares.
2020-05-26 15:07:43 -07: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
bvanvugt
ccd7a4e47d
Maintain at least 1 food on board at all times.
2020-02-01 10:47:15 -08:00
bvanvugt
37a4f3585b
Remove dead code from unit tests.
2020-01-14 16:39:26 -08:00
Brad Van Vugt
b69d768b13
correct error message
2020-01-05 21:53:11 -08:00
Brad Van Vugt
9c13dea6c0
Add error cases to standard move resolution.
2020-01-05 21:03:54 -08:00
Brad Van Vugt
7854e11e51
Package name rulesets -> rules.
2020-01-05 17:08:05 -08:00
Brad Van Vugt
72b6d78c93
More test coverage.
2020-01-03 12:56:33 -08:00
Brad Van Vugt
7d29514b6c
More test coverage for StandardRuleset.
2020-01-03 11:39:19 -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
2223ccf8a5
Update standard_test.go
2020-01-01 17:23:23 -08:00
Brad Van Vugt
798be609ba
Create standard_test.go
2019-12-31 20:43:45 -08:00