essential.getGameStateData
Prototype
function getGameStateData(playername)
Input parameters
playername - user name of the player to get the game state for
Return value
custom array object holding the game state for the player
Description
Called when a player (new or old) enters a room and wish to see the latest game state data.
Example code
function getGameStateData(playerName)
{
// Create a data structure for the current game state. The state inclues
// the global state variable and all player infos
var dataPacket = {"state":g_gameState, "playerInfos":getAllPlayerInfos()};
return dataPacket;
}
