Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function start(){
- while(frontIsClear()){
- move();
- }
- jumpHurdle();
- }
- function jumpHurdle(){
- turnLeft();
- move();
- turnRight();
- //HURDLE
- if(frontIsClear()){
- move();
- turnRight();
- move();
- turnLeft();
- start(); //RECURSION
- } else {
- //END
- turnRight();
- move();
- turnLeft();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment