Refactor rulesets into smaller composable operations In order to mix up the functionality from different rulesets like Solo, Royale, etc. the code in these classes needs to be broken up into small functions that can be composed in a pipeline to make a custom game mode.
108 lines
No EOL
1.9 KiB
JSON
108 lines
No EOL
1.9 KiB
JSON
{
|
|
"game": {
|
|
"id": "",
|
|
"ruleset": {
|
|
"name": "wrapped",
|
|
"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": {
|
|
"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": [
|
|
{
|
|
"x": 3,
|
|
"y": 3
|
|
}
|
|
],
|
|
"head": {
|
|
"x": 3,
|
|
"y": 3
|
|
},
|
|
"length": 1,
|
|
"shout": "",
|
|
"squad": "",
|
|
"customizations": {
|
|
"color": "#123456",
|
|
"head": "safe",
|
|
"tail": "curled"
|
|
}
|
|
}
|
|
} |