int stepType = getStep(index).getType();
int stepType = step1.getType(); int direction = step2.getType();
    private void transformLateralShift() {        if (steps.size() < 3) {            return;        }        int index = steps.size() - 3;        MoveStep step1 = getStep(index);        MoveStep step2 = getStep(index + 1);        MoveStep step3 = getStep(index + 2);        if (step1.oppositeTurn(step3)            && (step2.getType() == MovePath.STEP_BACKWARDS || step2.getType() == MovePath.STEP_FORWARDS)) {            int stepType = getStep(index).getType();            // remove all old steps            steps.removeElementAt(index);            steps.removeElementAt(index);            steps.removeElementAt(index);            // add new step            MoveStep shift = new MoveStep(this, lateralShiftForTurn(stepType));            addStep(shift);        }    }