SceneChoices.scenes = [];
SceneChoices.Title = "";
SceneChoices.Instructions = "";

function SceneChoices()
{
}

SceneChoices.Initialize = function( title, str )
{
	SceneChoices.scenes = [];
	SceneChoices.Title = title;
	SceneChoices.Instructions = str;
}

SceneChoices.setChoices = function( )
{
	SceneChoices.scenes = [];

	for (var i=0; i<arguments.length; i++)
	{
		SceneChoices.scenes[i] = arguments[i];
	}

	//console.log( "SceneChoices:  " + Object.toJSON( SceneChoices.scenes ) );
}

SceneChoices.isLastTest = function()
{
	//console.log("SceneChoices: SceneChoices.length=" + SceneChoices.scenes.length);
	if (SceneChoices.scenes.length == 0)
		return true;

	return false;
}

SceneChoices.pushNextScene = function(stage)
{
	var scene = SceneChoices.pop();

	if ((scene != undefined) && (scene.length != 0))
		stage.pushScene( scene );
	else
		stage.pushScene("complete", SceneChoices.Title, SceneChoices.Instructions);
}

// Pull a scene from the front of the queue
SceneChoices.pop = function()
{
	return SceneChoices.scenes.pop();
}

// Insert a scene to the front of the queue
SceneChoices.push = function( newScene )
{
	SceneChoices.scenes.push( newScene );
}



