turnLeft(); for (var side = 0; side < 4; side++) { while(frontIsClear()) { move(); } turnRight(); }