Advertisement
Talenheim

Climber.java

Nov 17th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. import edu.fcps.karel2.Display;
  2. import edu.fcps.karel2.Robot;
  3.    
  4. public class Climber extends Athlete
  5. {
  6.    public Climber()
  7.    {
  8.       super();
  9.    }
  10.    public Climber(int x)
  11.    {
  12.    super(x, 1, Display.NORTH, 1);
  13.    }
  14.    public void climbUpRight()
  15.    {
  16.       move();
  17.       move();
  18.       turnRight();
  19.       move();
  20.    }
  21.    public void climbUpLeft()
  22.    {
  23.       move();
  24.       move();
  25.       turnLeft();
  26.       move();
  27.    }
  28.    public void climbDownRight()
  29.    {
  30.       move();
  31.       turnRight();
  32.       move();
  33.       move();
  34.    }
  35.    public void climbDownLeft()
  36.    {
  37.       move();
  38.       turnLeft();
  39.       move();
  40.       move();
  41.    }
  42.    
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement