/** * Returns the final facing if a mech were to perform all the steps in this * path. */ public int getFinalFacing() { MoveStep last = getLastStep(); if (last != null) { return last.getFacing(); } return getEntity().getFacing(); }
int desiredFacing = intersectionStep.getFacing(); int leftTurnFacing = initialFacing; int rightTurnFacing = initialFacing;
facing = prev.getFacing(); position = prev.getPosition();
Mockito.when(mockLastStep.getFacing()).thenReturn(0);
curFacing = step.getFacing();
if (step != null) { position = step.getPosition(); facing = step.getFacing(); velocityLeft = step.getVelocityLeft();
break; case BACKWARDS: moveInDir((getFacing() + 3) % 6); setThisStepBackwards(true); if (!entity.hasQuirk(OptionsConstants.QUIRK_POS_POWER_REVERSE)) { moveInDir(getFacing()); setThisStepBackwards(false); compileMove(game, entity, prev); case CHARGE: if (!(entity.isAirborne()) || !game.useVectorMove()) { moveInDir(getFacing()); setThisStepBackwards(false); compileMove(game, entity, prev); case LATERAL_LEFT_BACKWARDS: case LATERAL_RIGHT_BACKWARDS: moveInDir((MovePath.getAdjustedFacing(getFacing(), MovePath.turnForLateralShift(getType())) + 3) % 6); setThisStepBackwards(true); case LATERAL_LEFT: case LATERAL_RIGHT: moveInDir(MovePath.getAdjustedFacing(getFacing(), MovePath.turnForLateralShift(getType()))); setThisStepBackwards(false); break;
curFacing = step.getFacing(); curElevation = step.getElevation();