Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network manager callbacks #3

Closed
addonovan opened this issue Mar 7, 2018 · 0 comments
Closed

Network manager callbacks #3

addonovan opened this issue Mar 7, 2018 · 0 comments
Assignees

Comments

@addonovan
Copy link
Owner

The NetworkManager class should provide a way to subscribe for the following events:

  • connected to a game (on_game_connect)
  • disconnected from a game (on_game_disconnect)
  • received a card (on_card_received)
  • found a game on the network (on_game_discovered)
  • a hand ended (on_hand_over)

Each of these subscription methods should have an unsubscription counterpart in the form of unsub_##action_name (e.g. unsub_on_game_connect)

GameDiscoveredEvent

Passed to a game discovered listener, contains the following data:

  • std::string table_name the name of the game
  • int table_id the id for the table
  • int open_seats the number of open seats in the game
  • Shoe shoe_type the type of shoe being played

GameConnectedEvent

Passed to a game connected listener.

  • int table_id the id for the connected table

GameDisconnectEvent

Passed to a game disconnected listener.

  • std::string reason The reason (if any) for being kicked

CardReceivedEvent

Passed to a card received listener.

  • int player_id the id for the player who was dealt the card
  • Card card the card that was dealt

HandOverEvent

Passed to a hand over listener.

  • std::string reason the reason the hand was ended
@addonovan addonovan self-assigned this Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant