right.addStep(MovePath.STEP_TURN_RIGHT); result.add( right.addStep(MovePath.STEP_FORWARDS) );
    public List getNextMoves(boolean backward, boolean forward) {        ArrayList result = new ArrayList();        MoveStep last = getLastStep();        if (isJumping()) {            MovePath next = (MovePath) this.clone();            for (int i = 0; i < 5; i++) {                result.add(next);                result.add(((MovePath) next.clone()).addStep(MovePath.STEP_FORWARDS));                next = (MovePath) next.clone();                next.addStep(MovePath.STEP_TURN_RIGHT);            }            return result;        }        if (getFinalProne()) {            if (last != null && last.getType() != STEP_TURN_RIGHT) {                result.add(((MovePath) this.clone()).addStep(MovePath.STEP_TURN_LEFT));            }            if (last != null && last.getType() != STEP_TURN_LEFT) {                result.add(((MovePath) this.clone()).addStep(MovePath.STEP_TURN_RIGHT));            }            result.add(((MovePath) this.clone()).addStep(MovePath.STEP_GET_UP));            return result;        }        if (canShift()) {            if (forward && (last == null || last.getType() != MovePath.STEP_LATERAL_LEFT)) {                result.add(((MovePath) this.clone()).addStep(STEP_LATERAL_RIGHT));            }            if (forward && (last == null || last.getType() != MovePath.STEP_LATERAL_RIGHT)) {                result.add(((MovePath) this.clone()).addStep(MovePath.STEP_LATERAL_LEFT));            }            if (backward && (last == null || last.getType() != MovePath.STEP_LATERAL_LEFT_BACKWARDS)) {                result.add(((MovePath) this.clone()).addStep(MovePath.STEP_LATERAL_RIGHT_BACKWARDS));            }            if (backward && (last == null || last.getType() != MovePath.STEP_LATERAL_RIGHT_BACKWARDS)) {                result.add(((MovePath) this.clone()).addStep(MovePath.STEP_LATERAL_LEFT_BACKWARDS));            }        }        if (forward && (last == null || last.getType() != MovePath.STEP_BACKWARDS)) {            result.add(((MovePath) this.clone()).addStep(MovePath.STEP_FORWARDS));        }        if (last == null || last.getType() != MovePath.STEP_TURN_LEFT) {            result.add(((MovePath) this.clone()).addStep(MovePath.STEP_TURN_RIGHT));        }        if (last == null || last.getType() != MovePath.STEP_TURN_RIGHT) {            result.add(((MovePath) this.clone()).addStep(MovePath.STEP_TURN_LEFT));        }        if (backward && (last == null || last.getType() != MovePath.STEP_FORWARDS)) {            result.add(((MovePath) this.clone()).addStep(MovePath.STEP_BACKWARDS));        }        return result;    }