🔴 : 클라이언트 → 게임 서버
🔵 : 게임 서버 → 클라이언트
{
"type": "connection_established",
"message": "You are now connected!"
}
{
"type": "game",
"subtype": "session_info",
"message": "",
"data": {
"battle_mode": 2,
"total_score": 15,
"level": 2,
"color": {
"paddle": "#FFFFFF",
"background": "#FFFFFF"
},
"headcount": 4,
"nickname": [
"wonyang", "jeongmin", "joyoo", "jihylim"
]
}
}
{
"type": "game",
"subtype": "tournament_tree"
"message": "",
"data": {
"battle_mode": 2,
"winner": "wonyang",
"bracket": [[["wonyang", "jeongmin"], ["joyoo", "jihylim"]], [["wonyang", "PONG !"]], [[""]]]
}
}
{
"type": "game",
"subtype": "tournament_tree",
"message": "good!",
"data": {}
}
{
"type": "game",
"subtype": "match_init_setting",
"message": "go!",
"data": {}
}
{
"type": "game",
"subtype": "match_init_setting"
"message": "",
**"match_id": 123,**
"data": {
"battle_mode": 2,
"color": {
"paddle": "#FFFFFF",
"background": "#FFFFFF",
"ball": "#FFFFFF",
}
"ball": {
"status": "in",
"x": 0.0,
"y": 0.0,
"radius": 0.04,
},
"paddle1": {
"x": -2.8,
"y": 0.0,
"width": 0.1,
"height": 0.5,
},
"paddle2": {
"x": 2.8,
"y": 0.0,
"width": 0.1,
"height": 0.5,
},
"nickname": {
"player1": "wonyang",
"player2": "jeongmin"
}
},
}