Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. function start(){
  2. for(var i = 0; i < 4; i++){
  3. move();
  4. putBall();
  5. turnLeft();
  6. }
  7. }
  8.  
  9.  
  10.  
  11.  
  12.  
  13. function start(){
  14. for(var i = 0; i < 5; i++){
  15. runToHurdle();
  16. jumpHurdle();
  17. }
  18. }
  19.  
  20. function runToHurdle(){
  21. move();
  22. move();
  23. }
  24. function jumpHurdle(){
  25. turnLeft();
  26. move();
  27. turnRight();
  28. move();
  29. turnRight();
  30. move();
  31. turnLeft();
  32. }
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. function start(){
  40. if (noBallsPresent()){
  41. putBall();
  42. }
  43. move();
  44. }
  45.  
  46.  
  47.  
  48.  
  49.  
  50. function start(){
  51. if (facingSouth()){
  52. turnLeft();
  53. }
  54. if (facingWest()){
  55. turnAround();
  56. }
  57. }
  58.  
  59.  
  60.  
  61.  
  62.  
  63. function start() {
  64. while (ballsPresent()){
  65. move();
  66. }
  67. }
  68.  
  69.  
  70.  
  71.  
  72.  
  73. function start(){
  74. while (noBallsPresent()){
  75. putBall();
  76. if (frontIsClear()){
  77. move();
  78. }
  79. }
  80. }
  81.  
  82.  
  83.  
  84.  
  85.  
  86. function start(){
  87. if (facingSouth()){
  88. up();
  89. }
  90. if (facingWest()){
  91. up2();
  92. }
  93. if (facingEast()){
  94. turnLeft();
  95. }
  96. while (noBallsPresent()){
  97. putBall();
  98. if (frontIsClear()){
  99. move();
  100. }
  101. }
  102. }
  103.  
  104. function up(){
  105. turnRight();
  106. turnRight();
  107. }
  108. function up2(){
  109. turnRight();
  110. }
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118. function start(){
  119. for (var i=0; i< 13; i++){
  120. jumpHurdle();
  121. }
  122. }
  123.  
  124. function jumpHurdle(){
  125. turnLeft();
  126. move();
  127. turnRight();
  128. move();
  129. turnRight();
  130. move();
  131. turnLeft();
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement