Add a "Version" field to GameMap Meta (#83)

* initial concept for versioning
* simple uint version implementation
* tidy up dependencies
This commit is contained in:
Torben 2022-06-15 15:51:42 -07:00 committed by GitHub
parent 0f15f34bdf
commit e8e20c53ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 23 additions and 5 deletions

View file

@ -1,6 +1,8 @@
package maps
import "github.com/BattlesnakeOfficial/rules"
import (
"github.com/BattlesnakeOfficial/rules"
)
type GameMap interface {
// Return a unique identifier for this map.
@ -20,6 +22,9 @@ type Metadata struct {
Name string
Author string
Description string
// Version is the current version of the game map.
// Each time a map is changed, the version number should be incremented by 1.
Version uint
}
// Editor is used by GameMap implementations to modify the board state.