SHARE
TWEET

Untitled

a guest Oct 10th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function start() {
  2.     //This starts when the program is run
  3.     while(frontIsClear()){
  4.         makeTower();
  5.         moveX2();
  6.     }
  7.     turnAround();
  8.     if(frontIsClear()){
  9.         move();
  10.         turnAround();
  11.         if(noBallsPresent()){
  12.             move();
  13.             makeTower();
  14.         }else{
  15.             move();
  16.         }
  17.     }else{
  18.         turnAround();
  19.         makeTower();
  20.     }
  21. }
  22.  
  23. function makeTower(){
  24.    
  25.     turnLeft();
  26.     putBall();
  27.     move();
  28.     putBall();
  29.     move();
  30.     putBall();
  31.     turnAround();
  32.     move();
  33.     move();
  34.     turnLeft();
  35.    
  36. }
  37.  
  38. function moveX2(){
  39.     if(frontIsClear()){
  40.         move();
  41.     }
  42.     if(frontIsClear()){
  43.         move();
  44.     }
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top