var mainState = {
	preload: function() {
		game.load.image("player","assets/player.png");
	},
create: function() {
  game.stage.backgroundColor = '#3498db';
  game.physics.startSystem(Phaser.Physics.ARCADE);
  game.renderer.renderSession.roundPixels = true;
  var player = game.add.sprite(game.width/250, 170, 'player');
  this.player = game.add.sprite(game.width/2, game.height/2,'player');
  this.player.anchor.setTo(0.5,0.5);
  game.physics.arcade.enable(this.player);
  this.player.body.gravity.y = 500;
  this.cursor = game.input.keyboard.createCursorKeys();
},
	update: function(){
		this.movePlayer();
		
	},

	movePlayer: function(){
		if(this.cursor.left.isDown){
			this.player.body.velocity.x = -200;
		}
		else if(this.cursor.right.isDown){
			this.player.body.velocity.x =200;

		}
		else{
			this.player.body.velocity.x = 0;

		}
		if(this.cursor.up.isDown && this.player.body.touching.down){
			this.player.body.velocity.y = -320;
		}
		}
	}
};
var game = new Phaser.Game(500, 340, Phaser.AUTO,'gameDiv');

game.state.add("main",mainState);
 game.state.start("main");



@@ -61,16 +61,17 @@
 player%22,
+ 
 %22assets/
@@ -88,16 +88,17 @@
 %22);%0A%09%7D,%0A
+%09
 create: 
@@ -110,18 +110,18 @@
 ion() %7B%0A
-  
+%09%09
 game.sta
@@ -152,18 +152,18 @@
 498db';%0A
-  
+%09%09
 game.phy
@@ -203,18 +203,18 @@
 RCADE);%0A
-  
+%09%09
 game.ren
@@ -253,18 +253,18 @@
 = true;%0A
-  
+%09%09
 var play
@@ -308,34 +308,34 @@
 170, 'player');%0A
-  
+%09%09
 this.player = ga
@@ -376,16 +376,17 @@
 eight/2,
+ 
 'player'
@@ -388,18 +388,18 @@
 ayer');%0A
-  
+%09%09
 this.pla
@@ -423,16 +423,17 @@
 0.5,
+ 
 0.5);%0A
-  
+%09%09
 game
@@ -469,18 +469,18 @@
 layer);%0A
-  
+%09%09
 this.pla
@@ -509,10 +509,10 @@
 00;%0A
-  
+%09%09
 this
@@ -561,16 +561,17 @@
 Keys();%0A
+%09
 %7D,%0A%09upda
@@ -580,24 +580,25 @@
 : function()
+ 
 %7B%0A%09%09this.mov
@@ -608,18 +608,16 @@
 ayer();%0A
-%09%09
 %0A%09%7D,%0A%0A%09m
@@ -639,24 +639,25 @@
 tion()%7B%0A%09%09if
+ 
 (this.cursor
@@ -661,37 +661,38 @@
 sor.left.isDown)
+ 
 %7B%0A
-%09%09%09
+   
 this.player.body
@@ -715,21 +715,23 @@
 00;%0A
-%09%09%7D%0A%09%09
+  %7D%0A%0A  
 else if
+ 
 (thi
@@ -748,29 +748,30 @@
 ight.isDown)
+ 
 %7B%0A
-%09%09%09
+   
 this.player.
@@ -791,29 +791,31 @@
 .x =
+ 
 200;%0A
-%0A%09%09%7D%0A%09%09
+  %7D%0A%0A  
 else
+ 
 %7B%0A
-%09%09%09
+   
 this
@@ -847,17 +847,18 @@
  0;%0A
-%0A%09%09%7D%0A%09%09
+  %7D%0A%0A  
 if
+ 
 (thi
@@ -914,13 +914,14 @@
 own)
+ 
 %7B%0A
-%09%09%09
+   
 this
@@ -956,18 +956,17 @@
 20;%0A
-%09%09%7D%0A%09%09%7D%0A%09%7D
+  %7D%0A%0A %7D%0A%0A
 %0A%7D;%0A
@@ -1014,16 +1014,17 @@
 er.AUTO,
+ 
 'gameDiv
@@ -1027,17 +1027,16 @@
 eDiv');%0A
-%0A
 game.sta
@@ -1049,16 +1049,17 @@
 (%22main%22,
+ 
 mainStat
@@ -1062,17 +1062,16 @@
 State);%0A
- 
 game.sta
@@ -1088,10 +1088,8 @@
 main%22);%0A
-%0A%0A

Update main.js