Advertisement
Guest User

Build Tower

a guest
Jan 19th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. /* This program draws a big tower from Karel's starting spot */
  2. function start(){
  3.  
  4. turnN();
  5.  
  6. column();
  7. }
  8. function turnN(){
  9. while (notFacingNorth()) {
  10. turnLeft();
  11. }
  12. }
  13. function column(){
  14. while (frontIsClear()) {
  15.  
  16. putBall();
  17.  
  18. move();
  19. }
  20. putBall();
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement