Here's my solution per each level, minified for your convenience:
Level 1 cellBlockA:
Tip: Change the code that is on black background.
Solution: /*delete everything*/
Level 2 theLongWayOut:
Tip: Find a way to disable offending code.
Solution: if(0) { ... }
Level 3 validationEngaged:
Tip: Change the location of the blocks.
Solution: for(var n=104; n--; )map.placeObject(n>>4, n%16, 'block')
Level 4 multiplicity:
Tip: The map does not verify something that the other maps do.
Solution: map.placeObject(45,20, 'exit')
Level 5:
Tip: use setSquareColor.
Solution: map.setSquareColor(x,y,'gold')
Alternative way of thinking: }}{{ // Now there's only one mine. For some reason though, this does not work. I suspect the game cheats somehow.
Level 6:
Tip: Add obstacles to the bot, paying attention to the route he takes.
Solution: map.placeObject(22,10,'block'); // The player moves 8*down, then all the way to the right.
Level 7 colors:
Tip: Change player's color depending on their current color.
Solution: for(var c=['#f00','#ff0','#0f0','#f00'],q=player,n=0;n<3;++n)if(q.getColor()==c[n]){q.setColor(c[n+1]);break;}
Level 8:
Tip: Try one of the functions.
Solution: generateForest
Level 9:
Tip: ---
Solution: map.getPlayer().setPhoneCallback(function(){raftDirection='up'})
Level 10 ambush:
Tip: ---
Solution: moveToward(me,'reinforcementDrone');me.move('left') |||| me.move('up') |||| me.move(Math.random(0,1)<.5?'up':'right')
Level 11:
Tip: ---
Solution: me.move(me.canMove('right')?'right':'down')
Level 12:
Tip: ---
Solution: if(typeof me.xp == 'undefined') me.xp = 0;
me.xp += 1;
if(me.xp & 1) me.move('right');
else if(me.xp < 30) me.move('down');
else if(me.xp < 70) me.move('up');
else me.move('down'); (probably not intended)
Level 13 robotMaze:
Tip: Find a way to tie the bot's movements to things the player can control.
Solution: var d=['right','left','down','up'],p=player; me.move(d[(p.getY()&2) + ((p.getX()&2)>>1)]) // Or you could use Djikstra's algorithm as Patashu did :-)
Alternative solution that does not involve either polling the player or reading the map beforehand, yet is guaranteed to solve the maze:
function c(x,y) { return 'c'+(x+me.getX())+'|'+(y+me.getY()) }
if(typeof me.know=='undefined')me.know={}
var dirs={'up':c(0,-1),'down':c(0,1),'left':c(-1,0),'right':c(1,0)}
var here=c(0,0), k=me.know, next='', best=-99, p
if(typeof k[here] == 'undefined') k[here]=0; --k[here];
for(var d in dirs) if(me.canMove(d)) { if(typeof k[p = dirs[d]] == 'undefined') k[p] = 0; if(k[p] >= best) { next=d; best=k[p]; } }
me.move(next)
Level 14:
Tip: ---
Solution: greenKey');map.placeObject(24,9,'yellowKey |||| Path: redLock redKey greenLock blueKey and the rest is obvious (This probably wasn't the intended solution.)
Level 15 exceptionalCrossing:
Tip: ---
Solution: )},'onCollision':function(){Math.random( (This is what most people did, I hear. Nevertheless, it is probably not the intended solution.)
Here's what I tried first, but alas, the limit is a few letters too short: )}});return;map.placeObject(2,2,'exit',function(){{x(
Shorter solution (thanks Warp!) -- probably abuses a bug, or maybe it is even the intended solution: map.x()
Level 16 lasers:
Tip: ---
Solution: color |||| var n=0,p=map.getPlayer(); p.setPhoneCallback(function(){p.setColor(colors[++n%3])})
Level 17 pointers:
Tip: Remember setSquareColor?
Solution: f(t1.getType()=='teleporter' && t2.getType()!='teleporter') map.setSquareColor(t1.getX(),t1.getY(),'#800');
if(t2.getType()=='teleporter' && t1.getType()!='teleporter') map.setSquareColor(t2.getX(),t2.getY(),'#800');
Level 18:
Tip: Remember placeObject?
Solution: map.placeObject(player.getX()+1,player.getY()+1,'block') // Instead of jumping, you are creating a bridge...
Level 19:
Tip: ---
Solution: Just press random directional buttons and the next level comes up very soon without need to understand a thing about this level.
Level 20 bossFight:
Tip: There's a reason why the boss creates bullets y+2 from their own position.
Solution: var p = map.getPlayer(),o=map.placeObject; o(30,20,'block');
map.defineObject('freedom', { 'type': 'dynamic', 'symbol': '<', 'color': 'green', 'interval': 100, 'projectile': true, 'behavior': function (me) { me.move('left') } });
p.setPhoneCallback(function(){ o(p.getX()-1, p.getY() , 'freedom'); });
// Use the single block of cover to get the phone. Then move to the top of the screen and begin the massacre.
Funny observation: Instead of blocks, which are counted and limited to one, you can create an unlimited number of trees that work the same way as blocks.
Level 21:
Tip: Open the menu.
Solution: Open menu, open objects.js, remove the single exclamation mark.
Level 22:
Tip: The game ends.
Solution: The game ends.