forked from Multiplayer-Game-Server/Multiplayer_Game_Server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsons.txt
More file actions
60 lines (52 loc) · 1.38 KB
/
jsons.txt
File metadata and controls
60 lines (52 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# от клиента, чтоб подключиться к комнате
{
type: "connect"
game_id: int
}
# от клиента, чтоб создать комнату
{
type: "create"
}
# от сервера, когда ты в комнате и подключился другой игрок
{
type: "new player"
player_id: int
}
# от сервера, когда клиент только подключился
{
type: "status"
player_id: int (c 0)
game_id: int (Если == None, то такой комнаты не существует)
list_of_players: [int, ...]
}
# от клиента, чтоб начать игру
{
type: "ready to start"
game_id : int
}
# от сервера, чтоб отправить вопрос
{
type: "question"
round: int (с 0 до 4)
question: srt
options: [str, str, str, str]
}
# от клиента, чтоб отправить ответ на вопрос
{
type: "answer"
round: int (с 0 до 4)
answer: int (с 0 до 3)
}
# от сервера, чтоб отправить правильный ответ
{
type: "correct answer"
correct_answ: str
your_res: bool (True если ответ правильный)
curr_score: [int, ...]
}
# от сервера, чтоб закончить игру
{
type: "end game"
winner : str
curr_score: [int, ...]
}