Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import edu.fcps.karel2.Display;
- import edu.fcps.karel2.Robot;
- public class Climber extends Athlete
- {
- public Climber()
- {
- super();
- }
- public Climber(int x)
- {
- super(x, 1, Display.NORTH, 1);
- }
- public void climbUpRight()
- {
- move();
- move();
- turnRight();
- move();
- }
- public void climbUpLeft()
- {
- move();
- move();
- turnLeft();
- move();
- }
- public void climbDownRight()
- {
- move();
- turnRight();
- move();
- move();
- }
- public void climbDownLeft()
- {
- move();
- turnLeft();
- move();
- move();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement