Completed edoc of player.
This commit is contained in:
parent
a27edf0d75
commit
702a887117
1 changed files with 12 additions and 6 deletions
|
@ -3,24 +3,30 @@
|
|||
|
||||
%% @doc This module handles communication between a player and GGS. This module is
|
||||
%%responsible for:
|
||||
%% * the storage of the player socket, player token and a table token.
|
||||
%% * The storage of the player socket, player token and a table token.
|
||||
%% * Ability to fetch a player token.
|
||||
%% * Forwarding messages from players to the game
|
||||
%% * Remove a player from GGS
|
||||
|
||||
%% @doc Spawns a new player process.
|
||||
%% @doc Spawns a process representing the player in GGS. Takes the player socket as
|
||||
%% an argument for storage and later usage. Creates a unique player token
|
||||
%% identifying the player.
|
||||
%% @spec start_link(Socket::socket()) -> ok
|
||||
start_link(Socket) -> not_implemented.
|
||||
|
||||
|
||||
%% @doc Handles incoming messages from the GGS and forwards them through the player
|
||||
%% socket to the player.
|
||||
%% @spec notify(Player::Pid(), From::Pid(),
|
||||
%% {Command::String(), Message::string()}) -> ok
|
||||
%% @doc send a message to a player.
|
||||
notify(Player, From, Message) -> not_implemented.
|
||||
|
||||
|
||||
%% @doc Get the player token uniquely representing the player.
|
||||
%% @spec get_token() -> string()
|
||||
%% @doc Get the player token.
|
||||
get_token() -> not_implemented.
|
||||
|
||||
|
||||
%% @doc Properly terminates the player process. The player token will be destroyed.
|
||||
%% Makes table token unreferenced and destroys the process in the end.
|
||||
%% @spec stop(Table::pid()) -> Reason::string()
|
||||
%% @doc Properly terminates the process.
|
||||
stop(Table) -> not_implemented.
|
||||
|
|
Reference in a new issue