Lines Matching refs:amount
65 public boolean canMoveBackwards(final int amount) {
66 return (this.currentRopePos + amount <= this.currentRope.length());
97 public void moveBackwards(final int amount) {
98 if (!this.canMoveBackwards(amount))
99 throw new IllegalArgumentException("Unable to move backwards " + amount + ".");
100 this.currentRopePos += amount;
101 this.currentAbsolutePos += amount;
104 public void moveForward(final int amount) {
105 this.currentAbsolutePos -= amount;
106 int remainingAmt = amount;
114 throw new IllegalArgumentException("Unable to move forward " + amount + ". Reached end of rope.");