Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function start() {
- //This starts when the program is run
- while(frontIsClear()){
- makeTower();
- moveX2();
- }
- turnAround();
- if(frontIsClear()){
- move();
- turnAround();
- if(noBallsPresent()){
- move();
- makeTower();
- }else{
- move();
- }
- }else{
- turnAround();
- makeTower();
- }
- }
- function makeTower(){
- turnLeft();
- putBall();
- move();
- putBall();
- move();
- putBall();
- turnAround();
- move();
- move();
- turnLeft();
- }
- function moveX2(){
- if(frontIsClear()){
- move();
- }
- if(frontIsClear()){
- move();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement