It does! Thanks, and thanks for a fun, engrossing diversion on a rainy Monday afternoon.
(Update: Each time I enter a level, it loads as level 13, and I have to reset it to get the correct map and code -- just a heads-up in case it helps with debugging. Chrome 33.something, Windows 7 x64.)
A few people have reported a similar bug. I don't think that it's level specific but has something to do with the next level not leading correctly upon completing a level.
We're still not sure why it happens or when (it seems to only affect a few people), but we'll try to figure it out.
There aren't any errors you can see in the JavaScript console, are there?
Good catch! We haven't been checking yet for tampering with functions, but we probably should. Don't think of it as a bug so much as a cheatcode you discovered :-)
First of all, this is absolutely impressive in concept.
Yes, it's too easy that way:
map.pO = map.placeObject;
map.placeObject = function(x, y, w){
return map.pO(x, y, w=='block'?'empty':w);
}
Does not even need call. But while you cannot protect from `Function['p'+'rototype']['c'+'all']`, I think using `defineProperty` to stop mucking with the code would go a long way into preventing blatant cheating at little cost. That or enclosed reference funcs.
Btw, you trust the level increment counter before succeeding in loading the level. Right now calls are 503ing, so basically I'm [gisting bogus solutions](https://gist.github.com/anonymous/f1b06d63848d6d013e26) but it's also saving those bogus level ups in localstorage...
I just added a feature to the game that watches certain functions and compares them to what they were at the start of the game (during the level validation phase). I'm sure this can still be gamed though.
Try going to level 15 and resetting the level (Ctrl-4). Does that help at all?