if (srcHex.getElevation() != destHex.getElevation()) { int delta_e = Math.abs(srcHex.getElevation() - destHex.getElevation());
if (srcHex.floor() != destHex.floor()) { int delta_e = Math.abs(srcHex.floor() - destHex.floor());
    public static int getMovementCostFor(Game game, int entityId,                                              Coords src, Coords dest,                                             int movementType) {        final Entity entity = game.getEntity(entityId);        final Hex srcHex = game.board.getHex(src);        final Hex destHex = game.board.getHex(dest);                // arguments valid?        if (entity == null) {            throw new IllegalArgumentException("Entity invalid.");        }        if (src.distance(dest) > 1) {            throw new IllegalArgumentException("Coordinates must be adjacent.");        }        if (srcHex == null || destHex == null) {            throw new IllegalArgumentException("Coordinates must be on the board.");        }                // jumping always costs 1        if (movementType == Entity.MOVE_JUMP) {            return 1;        }                int mp = 0;                // account for terrain        switch(destHex.getTerrainType()) {        default:            mp = 1;            break;        case Terrain.ROUGH :        case Terrain.RUBBLE :        case Terrain.FOREST_LITE :            mp = 2;            break;        case Terrain.FOREST_HVY :            mp = 3;            break;        case Terrain.WATER :            switch(destHex.getElevation()) {            case 0 :                mp = 1;                break;            case -1 :                mp = 2;                break;            default:                mp = 4;            }            break;        }        // account for elevation?        if (srcHex.getElevation() != destHex.getElevation()) {            int delta_e = Math.abs(srcHex.getElevation() - destHex.getElevation());            mp += delta_e;        }                return mp;    }