Created
August 25, 2016 19:26
-
-
Save amckinley/de3e10502d3c16a7a21fda0108c118f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
event names: | |
c->s: | |
host_game | |
join_game | |
hand_choices | |
s->c: | |
game_hosted | |
player_connected | |
round_start | |
player_ready | |
computing_results | |
results | |
==hosting new 2player game== | |
- host connects to server | |
p1 -> s: {host_game: {desired_players: 2} | |
- server creates game and room | |
s -> p1: {game_hosted: {game_id: foobar}} | |
- player2 connects to server | |
p2 -> s: { join_game: {game_id: foobar}} | |
- server puts p2 in foobar game room | |
s -> game_room: {player_connected: {player: p2}} | |
s -> p1: {round_start: {hole_cards: {...}, timeout_seconds: 30}} | |
s -> p2: {round_start: {hole_cards: {...}, timeout_seconds: 30}} | |
p1 -> s: {hand_choices: {...}} | |
s -> game_room: {player_ready: {player: p1}} | |
p2 -> s: {hand_choices: {...}} | |
s -> game_room: {player_ready: {player: p1}} | |
s -> game_room: {computing_results: { | |
hole_cards: {p1: [Ah, 8d, ...], p2: [Ks, ...]}}} | |
s -> game_room: {results: { | |
board_1: { | |
omaha: { | |
p1_hand: {Ah, ...}, | |
p2_hand: {Kh, ...}, | |
winner: p1, | |
p1_score: 4, | |
p2_score: -4}, | |
holdem: { | |
... | |
}, | |
highcard: { | |
... | |
} | |
}, | |
board_2: { | |
... | |
}, | |
round_scores: { | |
p1: 8, | |
p2: -8 | |
}, | |
total_scores: { | |
p1: -30, | |
p2: 30 | |
} | |
} | |
==resuming an existing 2player game== | |
- player connects to server | |
p1 -> s: {resume_game: {game_id: foobar}} | |
- server fetches game |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment