
function Players() {
	
	this.data = new Array();
	
	
	/**
	 * push player in the stack of players
	 */
	this.push = function (player)
	{
		this.data.push(player);
	}
	
	
	/**
	 * pop the last player in the stack of players
	 */
	this.pop = function()
	{
		this.data.pop();
	}
	
	
	/**
	 * get Player according to its id
	 */
	this.getPlayer = function (id)
	{
		if (id == undefined)
		{
			return this.data[0];
		}
		for (var i = 0; i < this.data.length; i++)
		{
			if (this.data[i].getId() == id)
			{
				return this.data[i];
			}
		}
		return null;
	}
	
	
	/**
	 * get Length of the stack
	 */
	this.length = function ()
	{
		return this.data.length;
	}
}

function SceneIntializedTracking(id)
{
	return players.getPlayer(id).SceneIntializedTracking();
}

var players = new Players();