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:
Rob O'Dwyer 2021-09-07 14:58:10 -07:00 committed by GitHub
parent 0cba5eff59
commit 31faba642c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 179 additions and 10 deletions

View 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": ""
}
}