键 | 值 | 说明 |
---|---|---|
mesg | room_list | |
room_list | [1,2,3,4] | 房间id数组 |
键 | 值 | 说明 |
---|---|---|
mesg | add_room | |
type | amazons | amazons或surakarta |
args | [10, 10] | 棋盘大小 |
time | 900 | 时间 (s) |
order | 1 | 1为先手,2为后手 |
键 | 值 | 说明 |
---|---|---|
mesg | join | |
room_id | 2 | 房间号 |
order | 1 | 1为先手,2为后手 |
键 | 值 | 说明 |
---|---|---|
playerId | 'A' | 玩家ID |
键 | 值 | 说明 |
---|---|---|
mesg | start |
键 | 值 | 说明 |
---|---|---|
state | ready | 如果对方没有开始则返回ready,否则返回start |
键 | 值 | 说明 |
---|---|---|
mesg | move | |
location | {'from': [0, 0], 'to': [1, 1]} | 移动坐标 |
kw | 0 | 如果棋种是亚马逊棋, 0为移动棋子, 1为移动障碍; 苏拉卡尔塔棋可空 |
键 | 值 | 说明 |
---|---|---|
mesg | rollback |
键 | 值 | 说明 |
---|---|---|
board | [[]] | 棋盘 |