Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function start(){
- startme();
- buildTower();
- putBall();
- }
- //This function make Karel face north is Karel is facing west.
- function startme(){
- if(facingWest()){
- turnRight();
- }
- if(facingEast()){
- turnLeft();
- }
- if(facingSouth()){
- turnLeft();
- turnLeft();
- }
- }
- //This function makes Karel put the tennis balls up to the top of the "world".
- function buildTower(){
- while(frontIsClear()){
- putBall();
- move();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement