diff --git a/cli/commands/testdata/snake_request_body.json b/cli/commands/testdata/snake_request_body.json index a10f89b..058c596 100644 --- a/cli/commands/testdata/snake_request_body.json +++ b/cli/commands/testdata/snake_request_body.json @@ -21,6 +21,7 @@ } } }, + "map": "", "timeout": 500, "source": "" }, diff --git a/cli/commands/testdata/snake_request_body_constrictor.json b/cli/commands/testdata/snake_request_body_constrictor.json index 15a2051..f57032d 100644 --- a/cli/commands/testdata/snake_request_body_constrictor.json +++ b/cli/commands/testdata/snake_request_body_constrictor.json @@ -1,108 +1,109 @@ { - "game": { - "id": "", - "ruleset": { - "name": "constrictor", - "version": "cli", - "settings": { - "foodSpawnChance": 11, - "minimumFood": 7, - "hazardDamagePerTurn": 19, - "hazardMap": "hz_spiral", - "hazardMapAuthor": "altersaddle", - "royale": { - "shrinkEveryNTurns": 0 - }, - "squad": { - "allowBodyCollisions": false, - "sharedElimination": false, - "sharedHealth": false, - "sharedLength": false - } + "game": { + "id": "", + "ruleset": { + "name": "constrictor", + "version": "cli", + "settings": { + "foodSpawnChance": 11, + "minimumFood": 7, + "hazardDamagePerTurn": 19, + "hazardMap": "hz_spiral", + "hazardMapAuthor": "altersaddle", + "royale": { + "shrinkEveryNTurns": 0 + }, + "squad": { + "allowBodyCollisions": false, + "sharedElimination": false, + "sharedHealth": false, + "sharedLength": false } - }, - "timeout": 500, - "source": "" + } }, - "turn": 0, - "board": { - "height": 11, - "width": 11, - "snakes": [ - { - "id": "one", - "name": "ONE", - "latency": "0", - "health": 0, - "body": [ - { - "x": 3, - "y": 3 - } - ], - "head": { + "map": "", + "timeout": 500, + "source": "" + }, + "turn": 0, + "board": { + "height": 11, + "width": 11, + "snakes": [ + { + "id": "one", + "name": "ONE", + "latency": "0", + "health": 0, + "body": [ + { "x": 3, "y": 3 - }, - "length": 1, - "shout": "", - "squad": "", - "customizations": { - "color": "#123456", - "head": "safe", - "tail": "curled" } - }, - { - "id": "two", - "name": "TWO", - "latency": "0", - "health": 0, - "body": [ - { - "x": 4, - "y": 3 - } - ], - "head": { - "x": 4, - "y": 3 - }, - "length": 1, - "shout": "", - "squad": "", - "customizations": { - "color": "#654321", - "head": "silly", - "tail": "bolt" - } - } - ], - "food": [], - "hazards": [] - }, - "you": { - "id": "one", - "name": "ONE", - "latency": "0", - "health": 0, - "body": [ - { + ], + "head": { "x": 3, "y": 3 + }, + "length": 1, + "shout": "", + "squad": "", + "customizations": { + "color": "#123456", + "head": "safe", + "tail": "curled" } - ], - "head": { + }, + { + "id": "two", + "name": "TWO", + "latency": "0", + "health": 0, + "body": [ + { + "x": 4, + "y": 3 + } + ], + "head": { + "x": 4, + "y": 3 + }, + "length": 1, + "shout": "", + "squad": "", + "customizations": { + "color": "#654321", + "head": "silly", + "tail": "bolt" + } + } + ], + "food": [], + "hazards": [] + }, + "you": { + "id": "one", + "name": "ONE", + "latency": "0", + "health": 0, + "body": [ + { "x": 3, "y": 3 - }, - "length": 1, - "shout": "", - "squad": "", - "customizations": { - "color": "#123456", - "head": "safe", - "tail": "curled" } + ], + "head": { + "x": 3, + "y": 3 + }, + "length": 1, + "shout": "", + "squad": "", + "customizations": { + "color": "#123456", + "head": "safe", + "tail": "curled" } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/cli/commands/testdata/snake_request_body_royale.json b/cli/commands/testdata/snake_request_body_royale.json index ea9a762..9e5cbf7 100644 --- a/cli/commands/testdata/snake_request_body_royale.json +++ b/cli/commands/testdata/snake_request_body_royale.json @@ -21,6 +21,7 @@ } } }, + "map": "", "timeout": 500, "source": "" }, diff --git a/cli/commands/testdata/snake_request_body_solo.json b/cli/commands/testdata/snake_request_body_solo.json index dc4a4f7..05a2934 100644 --- a/cli/commands/testdata/snake_request_body_solo.json +++ b/cli/commands/testdata/snake_request_body_solo.json @@ -21,6 +21,7 @@ } } }, + "map": "", "timeout": 500, "source": "" }, diff --git a/cli/commands/testdata/snake_request_body_squad.json b/cli/commands/testdata/snake_request_body_squad.json index 04c0bfa..8d54f17 100644 --- a/cli/commands/testdata/snake_request_body_squad.json +++ b/cli/commands/testdata/snake_request_body_squad.json @@ -21,6 +21,7 @@ } } }, + "map": "", "timeout": 500, "source": "" }, diff --git a/cli/commands/testdata/snake_request_body_standard.json b/cli/commands/testdata/snake_request_body_standard.json index f828c2c..a5e9111 100644 --- a/cli/commands/testdata/snake_request_body_standard.json +++ b/cli/commands/testdata/snake_request_body_standard.json @@ -21,6 +21,7 @@ } } }, + "map": "", "timeout": 500, "source": "" }, diff --git a/cli/commands/testdata/snake_request_body_wrapped.json b/cli/commands/testdata/snake_request_body_wrapped.json index 74978bc..7012b5a 100644 --- a/cli/commands/testdata/snake_request_body_wrapped.json +++ b/cli/commands/testdata/snake_request_body_wrapped.json @@ -21,6 +21,7 @@ } } }, + "map": "", "timeout": 500, "source": "" }, diff --git a/client/fixtures_test.go b/client/fixtures_test.go index a6a84c7..1678423 100644 --- a/client/fixtures_test.go +++ b/client/fixtures_test.go @@ -13,6 +13,7 @@ func exampleSnakeRequest() SnakeRequest { }, Timeout: 33, Source: "league", + Map: "standard", }, Turn: 11, Board: Board{ diff --git a/client/models.go b/client/models.go index e7ba495..4feaa73 100644 --- a/client/models.go +++ b/client/models.go @@ -14,6 +14,7 @@ type SnakeRequest struct { type Game struct { ID string `json:"id"` Ruleset Ruleset `json:"ruleset"` + Map string `json:"map"` Timeout int32 `json:"timeout"` Source string `json:"source"` } diff --git a/client/testdata/snake_request.json b/client/testdata/snake_request.json index 027946a..cd4b1a3 100644 --- a/client/testdata/snake_request.json +++ b/client/testdata/snake_request.json @@ -21,6 +21,7 @@ } } }, + "map": "standard", "timeout": 33, "source": "league" }, diff --git a/client/testdata/snake_request_empty_ruleset_settings.json b/client/testdata/snake_request_empty_ruleset_settings.json index ff0ef69..27ac226 100644 --- a/client/testdata/snake_request_empty_ruleset_settings.json +++ b/client/testdata/snake_request_empty_ruleset_settings.json @@ -21,6 +21,7 @@ } } }, + "map": "standard", "timeout": 33, "source": "league" },