Skip to content

Commit

Permalink
Solved game initialization bugs. Fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
KoolTheba committed Dec 29, 2018
1 parent db43c06 commit a36b12d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,22 @@ Enemy.prototype.render = function() {
};

// Now write your own player class
var Player = function (){

}

// This class requires an update(), render() and
// a handleInput() method.

Player.prototype.update = function (){};
Player.prototype.render = function (){};

// Now instantiate your objects.

// Place all enemy objects in an array called allEnemies
// Place the player object in a variable called player
var allEnemies = [];

// Place the player object in a variable called player
var player = new Player();


// This listens for key presses and sends the keys to your
Expand Down

0 comments on commit a36b12d

Please sign in to comment.