diff options
Diffstat (limited to 'go/game/map.go')
| -rw-r--r-- | go/game/map.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/go/game/map.go b/go/game/map.go index cecce9ca..ebf59d25 100644 --- a/go/game/map.go +++ b/go/game/map.go @@ -1,8 +1,8 @@ package game import ( - "fmt" "errors" + "fmt" "io" "log" "math/rand" @@ -20,7 +20,8 @@ const ( BASE_URL string = "localhost:8000/" MAP_URL_PART string = "html/build/maps" - DEFAULT_RESSOURCE_GAIN int = 5 + DEFAULT_RESSOURCE_GAIN int = 5 + DEFAULT_START_DECK string = "3 misc/farmer" ) type MapYml struct { @@ -32,6 +33,7 @@ type Map struct { Tiles [][]Tile symbols map[string]string RessourceGain int + StartDeckList string } func readMap(r io.Reader) (*Map, error) { @@ -52,7 +54,7 @@ func ParseMap(data []byte) (*Map, error) { mapYml.Symbols[" "] = "neutral" - m := &Map{[][]Tile{}, mapYml.Symbols, DEFAULT_RESSOURCE_GAIN} + m := &Map{[][]Tile{}, mapYml.Symbols, DEFAULT_RESSOURCE_GAIN, DEFAULT_START_DECK} rows := strings.Split(mapYml.Map, "\n") for y := 0; y < len(rows); y++ { |
