From a36b12d3ef91486f90cf18245699090848fa32a2 Mon Sep 17 00:00:00 2001 From: Teba Gomez Date: Sat, 29 Dec 2018 17:26:34 +0000 Subject: [PATCH] Solved game initialization bugs. Fix #4 --- js/app.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index dad7367547..452eb80885 100644 --- a/js/app.js +++ b/js/app.js @@ -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