/** * Check to see if this step's position is a valid end of a path. * * @return <code>true</code> if this step's position is a legal end of a * path. If the step is not legal for an end of a path, then * <code>false</code> is returned. */ public boolean isLegalEndPos() { // Can't be a stacking violation. boolean legal = true; if (isStackingViolation) { legal = false; } else if (terrainInvalid) { // Can't be into invalid terrain. legal = false; } else if (isJumping() && (distance == 0)) { // Can't jump zero hexes. legal = false; } else if (hasEverUnloaded && (type != MoveStepType.UNLOAD) && (type != MoveStepType.LAUNCH) && (type != MoveStepType.DROP) && (type != MoveStepType.UNDOCK) && (type != MoveStepType.DISCONNECT) && (getAltitude() == 0)) { // Can't be after unloading BA/inf legal = false; } return legal; }
/** * get final altitude */ public int getFinalAltitude() { if (getLastStep() != null) { return getLastStep().getAltitude(); } return getEntity().getAltitude(); }
if (step.getAltitude() > 0) { costStringBuf.append("{").append(step.getAltitude()) .append("}");
if (null != last) { vel = last.getVelocityLeft(); altitude = last.getAltitude(); pos = last.getPosition(); distance = last.getDistance();
if ((prev.getAltitude() > 0) || game.getBoard().inSpace()) { setMp(0);
if ((prev.getAltitude() > 0) || game.getBoard().inSpace()) {