Open snollygolly opened 8 years ago
Actions encompass all the actions a player can perform. Note: examples don't include non-action related fields, such as token
token
pass
Client -> Server
{ "type": "pass", "cards": [ "2H", "3H", "QS" ], "to": "PLAYER ID RECEIVING CARDS" }
play
{ "type": "play", "card": "5C" }
We need to listen for the following.
Server -> Client
{ "type": "pass", "cards": [ "2H", "3H", "QS" ], "from": "PLAYER ID SENDING CARDS" }
{ "from": "PLAYER ID WHO LAID THIS CARD DOWN", "type": "play", "card": "5C" }
trick
{ "type": "trick", "cards": [ "2H", "3H", "QS", "5H" ], "to": "PLAYER TAKING CARDS" }
All action events happen with the emitter/broadcast action
action
Actions encompass all the actions a player can perform. Note: examples don't include non-action related fields, such as
token
pass
typeplay
typeWe need to listen for the following.
pass
typeplay
typetrick
typeAll action events happen with the emitter/broadcast
action