Commit graph

5 commits

Author SHA1 Message Date
Torben
f0dc0bcb38
DEV-1313: Add additional map types (#76)
* add helper to draw a ring of hazards

* refactor tests to not be internal tests

* add "hz_inner_wall" map

* add "hz_rings" map

* fix map registry

* fix: edge case bugs in drawRing

* remove println

* add "hz_columns"

* add "hz_rivers_bridges" map

* WIP: implementing spiral hazards map

* finish basic testing of 'hz_spiral'

* include first turn

* add "hz_hazards" map

* remove incorrect author

* add "hz_grow_box" map

* add "hz_expand_box" map

* add "hz_expand_scatter" map

* remove debug

* document the new "Range" method

* - use rules.RulesetError instead of generic error
- use a rules.Point for map rivers and bridgets map key

* use rules.RulesetError instead of errors.New

* provide more detail about boundar conditions

* fix documentation (max can be == min)

* add unit tests
2022-06-01 11:39:31 -07:00
Torben
3bd1e47bb4
change all "int32" types to "int" (#75) 2022-05-25 11:17:41 -07:00
Rob O'Dwyer
e94d758a9b
DEV 1303: Add empty and royale maps and update game map interface (#72)
* move random generator into Settings

* add empty and royale maps

* place snakes on either cardinal or corner positions first
2022-05-17 15:45:56 -07:00
Rob O'Dwyer
6fa2da2f01 tests for SetupBoard and UpdateBoard and a bugfix 2022-05-11 16:30:08 -07:00
Rob O'Dwyer
dab9178a55
DEV 1247: Add a new map generator interface (#71)
* 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
2022-05-11 08:26:28 -07:00