<< All transfer in json >>
client | server | |
---|---|---|
{ | { | |
“cmd”: “start”, | “status”: “$S”, | |
“right”: “$P”, | –> | “why”: “$STR”, |
“left”: “$P” | “cmd”: “status” | |
} | } | |
## $P == [“human”, “random”, | ||
## “strategy”, “MCTS”] | ## $S == [“ok”, “err”, “end”] | |
transfering | { | |
{ | “status”: “$S”, | |
“cmd”: “transfer”, | “why”: “$STR”, | |
“x”: $NUMBER, | <-> | “cmd”: “status” |
“y”: $NUMBER, | } | |
“stone”: $NUMBER, | ## if why is err | |
“rotate”: $NUMBER | “origin”?: {x, y, stone, rotate} | |
} | ||
Ending | ||
{ | <– | { |
“cmd”: “ok”, | “status”: “end”, | |
“why”:”$STR” | “why”: “winner is xxx”, | |
} | “cmd”: “status” | |
} | ||
–> | connection close |