Add missing ruleset params to request body and --debug-requests option (#55)
* fix sending of new params * add royale and squad settings to requests * add --debug-requests option * update test for request body and add helper Co-authored-by: Penelope Phippen <penelope@hey.com>
This commit is contained in:
parent
0cba5eff59
commit
31faba642c
5 changed files with 179 additions and 10 deletions
90
cli/commands/testdata/snake_request_body.json
vendored
Normal file
90
cli/commands/testdata/snake_request_body.json
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"game": {
|
||||
"id": "",
|
||||
"timeout": 500,
|
||||
"ruleset": {
|
||||
"name": "standard",
|
||||
"version": "cli",
|
||||
"settings": {
|
||||
"hazardDamagePerTurn": 14,
|
||||
"foodSpawnChance": 15,
|
||||
"minimumFood": 1,
|
||||
"royale": {
|
||||
"shrinkEveryNTurns": 25
|
||||
},
|
||||
"squad": {
|
||||
"allowBodyCollisions": true,
|
||||
"sharedElimination": true,
|
||||
"sharedHealth": true,
|
||||
"sharedLength": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"turn": 0,
|
||||
"board": {
|
||||
"height": 11,
|
||||
"width": 11,
|
||||
"food": [],
|
||||
"hazards": [],
|
||||
"snakes": [
|
||||
{
|
||||
"id": "one",
|
||||
"name": "",
|
||||
"health": 0,
|
||||
"body": [
|
||||
{
|
||||
"x": 3,
|
||||
"y": 3
|
||||
}
|
||||
],
|
||||
"latency": "0",
|
||||
"head": {
|
||||
"x": 3,
|
||||
"y": 3
|
||||
},
|
||||
"length": 1,
|
||||
"shout": "",
|
||||
"squad": ""
|
||||
},
|
||||
{
|
||||
"id": "two",
|
||||
"name": "",
|
||||
"health": 0,
|
||||
"body": [
|
||||
{
|
||||
"x": 4,
|
||||
"y": 3
|
||||
}
|
||||
],
|
||||
"latency": "0",
|
||||
"head": {
|
||||
"x": 4,
|
||||
"y": 3
|
||||
},
|
||||
"length": 1,
|
||||
"shout": "",
|
||||
"squad": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"you": {
|
||||
"id": "one",
|
||||
"name": "",
|
||||
"health": 0,
|
||||
"body": [
|
||||
{
|
||||
"x": 3,
|
||||
"y": 3
|
||||
}
|
||||
],
|
||||
"latency": "0",
|
||||
"head": {
|
||||
"x": 3,
|
||||
"y": 3
|
||||
},
|
||||
"length": 1,
|
||||
"shout": "",
|
||||
"squad": ""
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue