Location of WebSocket:
/ws
Notes:
- The name of the field does matter.
- The order of the fields does not matter.
{
"EventType": "Chat",
"EventBody": "Hello World!",
}
Note: The "Value" field must be either 1 or 2. It corresponds to Player 1 or Player 2. Without entering that field, the message might be ignored.
{
"EventType": "LaBomba",
"Value": 1,
"Location":
{
"X": 0,
"Y": 47,
}
}
{
"EventType": "LifeUpdate",
}
Currently, the Grid is 48 x 48. So the Location coordinates x and y are in the range of [0, 47].
Values match with different kinds of squares (can depend on the game). For example, in "The Game of War":
- 0: neutral (empty)
- 1: player 1
- 2: player 2
- 3: fire
- 4: fading fire / fallout zone
- 5: '''
- 6: '''
{
"EventType": "LifeChange",
"Value": 1,
"Location":
{
"X": 0,
"Y": 47,
}
}
When you want many changes to be made within the same game tick:
{
"EventType": "ChangeMany",
"Changes":
[
{
"Value": 1,
"Location":
{
"X": 1,
"Y": 10
}
},
{
"Value": 2,
"Location":
{
"X": 2,
"Y": 20
}
}
]
}
A simple Reset of the game board, where every square becomes either player 1 or player 2.
{
"EventType": "FreshGame"
}
The "Integer" Field is optional. It is the number of squares to that will be placed on the board after the reset. For example, if you set the "integer" field to 1: Then 1 square will be created at a random location on the game board, and will be randomly given to either player 1 or player 2.
{
"EventType": "LifeRandomize",
"Integer": 500,
}