-
There is a way to make testing of all levels easier. Just toggle collisions by commenting the line 228 in my-engine.js file:
player.checkCollisions(allEnemies[row][num1]);
It's preceded by the comment that says:
Comment the next line to turn off collisions...
It also makes sense to decrease the number of hops, so that you don't have to get to the other side 20 times before you complete a level. To do so, find the
switch
in my-engine.js (line 40) and reduce the value in:this.hops = {value: ...};
to 3 or 5 for each level.
-
I have considerably altered the Udacity's engine and tried to make the comments as detailed as possible. The summary of major changes can be found in the beginning of my-engine.js. I haven't removed original comments. The ones I have added begin with "EN:" - also in app.js, for consistency.
-
A simplified structure of the app.js file is shown below:
It displays main functions and properties of objects in app.js and where they are used, also in my-engine.js.
The drawing is stored here (/images/svgs/app-structure.svg).