Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. function main(){
  2. putBeeper();
  3. putBeeperLine();
  4. goBack();
  5. turnRight();
  6. putBeeperLine();
  7. turnRight();
  8. move();
  9. }
  10.  
  11. function putBeeperLine(){
  12. while (frontIsClear()) {
  13. move();
  14. move();
  15. putBeeper();
  16. }
  17. }
  18.  
  19. function goBack(){
  20. turnLeft();
  21. turnLeft();
  22.  
  23. while (frontIsClear()){
  24. move();
  25. }
  26. }
  27.  
  28. function turnRight(){
  29. turnLeft();
  30. turnLeft();
  31. turnLeft();
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement