Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Karel must help rebuild
- //broken columns. Make a
- //column of beepers above
- //each beeper you find on
- //the first row
- function main() {
- while(frontIsClear()){
- checkNPlace();
- move();
- }
- }
- function checkNPlace(){
- if(beepersPresent()){
- turnLeft();
- while(frontIsClear()){
- move();
- putBeeper();
- }
- turnAround();
- while(frontIsClear()){
- move();
- }
- turnLeft();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement