Open surfskidude opened 7 years ago
It does work at first. Until you complete level 1. The biscuits dont reset because you don't clone the map anymore but use the current instance of the map
just replace map = Pacman.MAP.clone();
with map = JSON.parse(JSON.stringify(Pacman.MAP));
and remove the Object.prototype.clone
function
Hello, it solves a lot of problem also if you want to import it in angular component. Thank you!
The clone function at the end of pacman.js seems to corrupt JQuery, in particular the $.getXXX functions.
I removed the code and replaced: map = Pacman.MAP.clone(); with map = Pacman.MAP;
The code seems to work with this change