Interesting, you might want to look at the suggested code though, maybe play through with some beginners?
function init(robot){
robot.number = 0;
}
function loop(robot){
robot.jump();
if(robot.number++ % 2 == 0){
robot.move(2);
}
}
This is in the second level.Incrementing inside a check is awkward, as is just calling the variable 'number'. Perhaps something like
function init(robot){
robot.jump_next = true;
}
function loop(robot){
if (robot.jump_next) {
robot.jump()
robot.jump_next = false;
} else {
robot.move(2);
robot.jump_next = true;
}
}