Advertisement
Guest User

Random Hurdles

a guest
Jan 19th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function start(){
  2. for (var i = 0; i < 13; i++) {
  3. if (frontIsBlocked()) {
  4. jumpHurdle();
  5. } else {
  6. move();
  7. }
  8. }
  9. // Write your code here
  10. }
  11. function jumpHurdle(){
  12. turnLeft();
  13. move();
  14. turnRight();
  15. move();
  16. turnRight();
  17. move();
  18. turnLeft();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement