Files
autobeerpong/src/schema/match/state.json
T
Denis 72e6cb10ed Backend - Add match logic (#38)
* add method to update server state

* add draft test match unit test class

* add join response message class

* add lobby state message class

* add spectator raw type

* add start match json schema

* add start match message class

* add test client manager class

* change client to return server responses as python classes

* add start match test method

* adapt old unit tests to use python message classes

* shortcut two players join and ready protocol

* fix wrong imports

* add message to assertion

* make broadcast function send message provided as argument

* add match state message class

* add match state json schema

* add match utility class

* add match state message class

* extend test function with match state check

* remove print statement

* add missing match schemas to frontend and add id properties

* make state keys unique

* fix MockSocket

* add basic match history funtionality

* use Prettier formatter

* fix typehint error
2026-05-04 20:00:44 +02:00

31 lines
819 B
JSON

{
"$id": "http://localhost/match/state.json",
"type": "object",
"properties": {
"messageType": {
"const": "matchState"
},
"messageContent": {
"type": "object",
"properties": {
"history": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "./table.json"
},
{
"$ref": "./action.json"
}
]
}
}
},
"required": [
"history"
],
"additionalProperties": false
}
}
}