Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Write a program to lay a row of tennis balls
- * across first street. Make sure to test your
- * program on multiple worlds. */
- public class TennisBallRowKarel extends SuperKarel
- {
- public void run()
- {
- while (noBallsPresent())
- {
- if (frontIsClear())
- {putBall();
- move();}
- else
- {putBall();}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement