Browse Source

erlang code

Maxim Sokhatsky 11 years ago
parent
commit
33fc996ba2
1 changed files with 15 additions and 11 deletions
  1. 15 11
      apps/server/src/README.md

+ 15 - 11
apps/server/src/README.md

@@ -22,21 +22,25 @@ Each game could have specific actions and events.
 Actions
 Actions
 -------
 -------
 
 
-    -record(session_attach, {token}).
+```erlang
-    -record(logout, {}).
+-record(session_attach, {token}).
-    -record(join_game, {game :: 'GameId'() }).
+-record(logout, {}).
-    -record(stats_action, {player :: 'PlayerId'(), game_type}).
+-record(join_game, {game :: 'GameId'() }).
-    -record(pause_game, {table, game :: 'GameId'(), action}).
+-record(stats_action, {player :: 'PlayerId'(), game_type}).
-    -record(game_action, {game :: 'GameId'(), action, args = []}).
+-record(pause_game, {table, game :: 'GameId'(), action}).
+-record(game_action, {game :: 'GameId'(), action, args = []}).
+```
 
 
 Events
 Events
 ------
 ------
 
 
-    -record(game_event, {game :: 'GameId'(), event, args = [] }).
+```erlang
-    -record(stats_event, {player :: 'PlayerId'(), games, reveals, protocol}).
+-record(game_event, {game :: 'GameId'(), event, args = [] }).
-    -record(game_paused, {table, game :: 'GameId'(), action, who :: 'PlayerId'(), retries}).
+-record(stats_event, {player :: 'PlayerId'(), games, reveals, protocol}).
-    -record(disconnect, {code :: integet(), reason}).
+-record(game_paused, {table, game :: 'GameId'(), action, who :: 'PlayerId'(), retries}).
-    -record(player_left, {player :: 'PlayerId'(), human_replaced, replacement :: 'PlayerId'()}).
+-record(disconnect, {code :: integet(), reason}).
+-record(player_left, {player :: 'PlayerId'(), human_replaced, replacement :: 'PlayerId'()}).
+```
 
 
 Token Server
 Token Server
 ------------
 ------------