From 702a887117cf9c1992b2d4b6997ee1e28a2d6065 Mon Sep 17 00:00:00 2001 From: Kallfaktorn Date: Wed, 16 Feb 2011 18:03:48 +0100 Subject: [PATCH] Completed edoc of player. --- src/ggs_player.erl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ggs_player.erl b/src/ggs_player.erl index 4a24ef4..b5815af 100644 --- a/src/ggs_player.erl +++ b/src/ggs_player.erl @@ -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.