Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://stanfordkarel.com/lessons.html#/english/unit8/lesson5
- //Make Karel fill the world
- //with beepers
- function main() {
- //your code here
- putBeeperLine();
- turnLeft();
- move();
- turnLeft();
- putBeeperLine();
- turnRight();
- move();
- turnRight();
- putBeeperLine();
- turnLeft();
- move();
- turnLeft();
- putBeeperLine();
- turnRight();
- move();
- turnRight();
- putBeeperLine();
- turnLeft();
- move();
- turnLeft();
- putBeeperLine();
- turnRight();
- move();
- turnRight();
- putBeeperLine();
- turnLeft();
- move();
- turnLeft();
- putBeeperLine();
- turnRight();
- turnRight();
- move();
- move();
- move();
- move();
- move();
- move();
- move();
- }
- function putBeeperLine(){
- putBeeper();
- while(frontIsClear()) {
- move();
- putBeeper();
- }
- }
Add Comment
Please, Sign In to add comment