Protocol for Live View

This page describes the communication between Server and Live View.

There are two different phases:

  1. Registration
  2. Live Game Displaying

Registration

tbd

Live Game Displaying

During the Live Game Displaying phase the communication is one-way in the sense that the viewer is only listening and not sending. Messages in the Live Game Displaying phase are always broadcasted to every viewer (there can be several). Basically the live view gets the same messages that are broadcasted to the bots. The viewer can be seen as a 'passive bot' that only gets informed about occurred events and cannot do any actions himself.

These are the messages that are sent to the view at the same point of time where the bots gets the according messages: (The exact specification of each message is the same as in the bot to server protocol.)

  • /player_set
  • /player_folded
  • /match_started
  • /round_finished
  • /showdown
  • /match_finished

There is one exception where the view does not get the same message as a bot: The /round_started message. In order to display the cards of each player the view needs to know the cards before the first player action. Information about the cards is sent in a view specific /round_started message:

/round_started

{
    round_number: 1,
    round_players: [{
        name: player1,
        stack: 200,
        cards: [3]
    }, {
        name: player2,
        stack: 200,
        cards: [12]
    }],
    round_dealer: "player1"
}