Advertisement
technologiclee

Untitled

Aug 29th, 2011
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. //http://stanfordkarel.com/lessons.html#/english/unit9/lesson2
  2. //Partial solution
  3.  
  4. //Karel must help rebuild
  5. //broken columns. Make a
  6. //column of beepers above
  7. //each beeper you find on
  8. //the first row
  9. function main() {
  10. while(frontIsClear()){
  11. move();
  12. if (beepersPresent())
  13. {
  14. turnLeft();
  15. move();
  16. while (noBeepersPresent())
  17. {
  18. putBeeper();
  19. move();
  20. }
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement