essential.createPlayerInfo
Prototype
function createPlayerInfo(playerName, position)
Input parameters
playername - the user name of the player to create info object for
postition - the players position in the game room
Return value
custom array object holding information about the player
Description
Called when a new player has joined and should return game specific data we wish to associate with this player.
Example code
function createPlayerInfo(playerName, position)
{
// Setup a playerInfo object for a newly added player
var playerInfo = {"pos":-1, "score":0, "correctLastAnswer":-1,
"lastAnswer":-1, "lastScore":-1, "numCorrectAnswers":0};
playerInfo.pos = position;
return playerInfo;
}
