* DEV-1761: Clean up Ruleset interface (#115) * remove legacy ruleset types and simplify ruleset interface * remove unnecessary settings argument from Ruleset interface * decouple rules.Settings from client API and store settings as strings * DEV 1761: Add new BoardState and Point fields (#117) * add Point.TTL, Point.Value, GameState and PointState to BoardState * allow maps to access BoardState.GameState,PointState * add PreUpdateBoard and refactor snail_mode with it * fix bug where an extra turn was printed to the console * fix formatting * fix lint errors Co-authored-by: JonathanArns <jonathan.arns@googlemail.com>
147 lines
No EOL
2.6 KiB
JSON
147 lines
No EOL
2.6 KiB
JSON
{
|
|
"game": {
|
|
"id": "game-id",
|
|
"ruleset": {
|
|
"name": "test-ruleset-name",
|
|
"version": "cli",
|
|
"settings": {
|
|
"foodSpawnChance": 10,
|
|
"minimumFood": 20,
|
|
"hazardDamagePerTurn": 30,
|
|
"hazardMap": "",
|
|
"hazardMapAuthor": "",
|
|
"royale": {
|
|
"shrinkEveryNTurns": 40
|
|
},
|
|
"squad": {
|
|
"allowBodyCollisions": false,
|
|
"sharedElimination": false,
|
|
"sharedHealth": false,
|
|
"sharedLength": false
|
|
}
|
|
}
|
|
},
|
|
"map": "standard",
|
|
"timeout": 33,
|
|
"source": "league"
|
|
},
|
|
"turn": 11,
|
|
"board": {
|
|
"height": 22,
|
|
"width": 11,
|
|
"snakes": [
|
|
{
|
|
"id": "snake-0",
|
|
"name": "snake-0-name",
|
|
"latency": "snake-0-latency",
|
|
"health": 100,
|
|
"body": [
|
|
{
|
|
"x": 1,
|
|
"y": 2
|
|
},
|
|
{
|
|
"x": 1,
|
|
"y": 3
|
|
},
|
|
{
|
|
"x": 1,
|
|
"y": 4
|
|
}
|
|
],
|
|
"head": {
|
|
"x": 1,
|
|
"y": 2
|
|
},
|
|
"length": 3,
|
|
"shout": "snake-0-shout",
|
|
"squad": "",
|
|
"customizations": {
|
|
"color": "#123456",
|
|
"head": "safe",
|
|
"tail": "curled"
|
|
}
|
|
},
|
|
{
|
|
"id": "snake-1",
|
|
"name": "snake-1-name",
|
|
"latency": "snake-1-latency",
|
|
"health": 200,
|
|
"body": [
|
|
{
|
|
"x": 2,
|
|
"y": 2
|
|
},
|
|
{
|
|
"x": 2,
|
|
"y": 3
|
|
},
|
|
{
|
|
"x": 2,
|
|
"y": 4
|
|
}
|
|
],
|
|
"head": {
|
|
"x": 2,
|
|
"y": 2
|
|
},
|
|
"length": 3,
|
|
"shout": "snake-1-shout",
|
|
"squad": "snake-1-squad",
|
|
"customizations": {
|
|
"color": "#654321",
|
|
"head": "silly",
|
|
"tail": "bolt"
|
|
}
|
|
}
|
|
],
|
|
"food": [
|
|
{
|
|
"x": 2,
|
|
"y": 2
|
|
}
|
|
],
|
|
"hazards": [
|
|
{
|
|
"x": 8,
|
|
"y": 8
|
|
},
|
|
{
|
|
"x": 9,
|
|
"y": 9
|
|
}
|
|
]
|
|
},
|
|
"you": {
|
|
"id": "snake-1",
|
|
"name": "snake-1-name",
|
|
"latency": "snake-1-latency",
|
|
"health": 200,
|
|
"body": [
|
|
{
|
|
"x": 2,
|
|
"y": 2
|
|
},
|
|
{
|
|
"x": 2,
|
|
"y": 3
|
|
},
|
|
{
|
|
"x": 2,
|
|
"y": 4
|
|
}
|
|
],
|
|
"head": {
|
|
"x": 2,
|
|
"y": 2
|
|
},
|
|
"length": 3,
|
|
"shout": "snake-1-shout",
|
|
"squad": "snake-1-squad",
|
|
"customizations": {
|
|
"color": "#654321",
|
|
"head": "silly",
|
|
"tail": "bolt"
|
|
}
|
|
}
|
|
} |