function render(elapsedTime, ctx) {
	
	
	if(GameOver==true){
		ctx.font = "75px Arial";
		ctx.fillText("GAME OVER", 250,250);
		ctx.font = "50px Arial";
		ctx.fillText("REFRESH BROWSER TO RESTART",100,350);
		return;
	}
  ctx.fillStyle = "black";
  ctx.fillRect(0, 0, canvas.width, canvas.height);
  player.render(elapsedTime, ctx);
  objects.forEach(function(object, index) {
	  object.render(elapsedTime,ctx);
  });
  ctx.fillStyle = "red";
	ctx.font = "25px Arial";
	ctx.fillText("Level: " +level, 10,30);
	ctx.fillText("Lives: " +lives, 10,60);
	ctx.fillText("Score: " +score, 10,90);
	ctx.fillText("Warp Drive:" +canWarp, 400,30);
}
/**
  * @function render
  * Renders the current game state into a back buffer.
  * @param {DOMHighResTimeStamp} elapsedTime indicates
  * the number of milliseconds passed since the last frame.
  * @param {CanvasRenderingContext2D} ctx the context to render to
  */
@function render
Renders the current game state into a back buffer.
@param {DOMHighResTimeStamp} elapsedTime indicates
the number of milliseconds passed since the last frame.
@param {CanvasRenderingContext2D} ctx the context to render to
@function render Renders the current game state into a back buffer . @param { DOMHighResTimeStamp } elapsedTime indicates the number of milliseconds passed since the last frame . @param { CanvasRenderingContext2D } ctx the context to render to
function render(elapsedTime, ctx) {
	if(GameOver==true){
		ctx.font = "75px Arial";
		ctx.fillText("GAME OVER", 250,250);
		ctx.font = "50px Arial";
		ctx.fillText("REFRESH BROWSER TO RESTART",100,350);
		return;
	}
  ctx.fillStyle = "black";
  ctx.fillRect(0, 0, canvas.width, canvas.height);
  player.render(elapsedTime, ctx);
  objects.forEach(function(object, index) {
	  object.render(elapsedTime,ctx);
  });
  ctx.fillStyle = "red";
	ctx.font = "25px Arial";
	ctx.fillText("Level: " +level, 10,30);
	ctx.fillText("Lives: " +lives, 10,60);
	ctx.fillText("Score: " +score, 10,90);
	ctx.fillText("Warp Drive:" +canWarp, 400,30);
}
function render ( elapsedTime , ctx ) { if ( GameOver == true ) { ctx . font = "75px Arial" ; ctx . fillText ( "GAME OVER" , 250 , 250 ) ; ctx . font = "50px Arial" ; ctx . fillText ( "REFRESH BROWSER TO RESTART" , 100 , 350 ) ; return ; } ctx . fillStyle = "black" ; ctx . fillRect ( 0 , 0 , canvas . width , canvas . height ) ; player . render ( elapsedTime , ctx ) ; objects . forEach ( function ( object , index ) { object . render ( elapsedTime , ctx ) ; } ) ; ctx . fillStyle = "red" ; ctx . font = "25px Arial" ; ctx . fillText ( "Level: " + level , 10 , 30 ) ; ctx . fillText ( "Lives: " + lives , 10 , 60 ) ; ctx . fillText ( "Score: " + score , 10 , 90 ) ; ctx . fillText ( "Warp Drive:" + canWarp , 400 , 30 ) ; }
@function render
 Renders the current game state into a back buffer.
@function render Renders the current game state into a back buffer .