Add a "Version" field to GameMap Meta (#83)
* initial concept for versioning * simple uint version implementation * tidy up dependencies
This commit is contained in:
parent
0f15f34bdf
commit
e8e20c53ad
8 changed files with 23 additions and 5 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package maps
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/BattlesnakeOfficial/rules"
|
||||
|
|
@ -22,7 +23,7 @@ func TestRegisteredMaps(t *testing.T) {
|
|||
for mapName, gameMap := range globalRegistry {
|
||||
t.Run(mapName, func(t *testing.T) {
|
||||
require.Equalf(t, mapName, gameMap.ID(), "%#v game map doesn't return its own ID", mapName)
|
||||
|
||||
require.True(t, gameMap.Meta().Version > 0, fmt.Sprintf("registered maps must have a valid version (>= 1) - '%d' is invalid", gameMap.Meta().Version))
|
||||
var setupBoardState *rules.BoardState
|
||||
|
||||
for width := 0; width < maxBoardWidth; width++ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue