this.elevation = targetHex.getElevation(); this.height = Math.max(targetHex.terrainLevel( Terrains.BLDG_ELEV ) - 1, targetHex.terrainLevel(Terrains.BRIDGE_ELEV));
elevation = Math.max(-targetHex.depth(), targetHex.terrainLevel(Terrains.BRIDGE_ELEV)); height = targetHex.terrainLevel( Terrains.BLDG_ELEV ); if(height <= 0) height = 0; else height--;
    protected void init( Coords coords, IBoard board, boolean ignite ) {        this.position = coords;        this.isIgnite = ignite;        // Get the building at the given coordinates.        Building bldg = board.getBuildingAt( this.position );        if ( bldg == null ) {            throw new IllegalArgumentException( "The coordinates, " +                                                this.position.getBoardNum() +                                                ", do not contain a building."                                                );        }        // Save the building's ID.        this.id = coordsToId( coords );        // Generate a name.        StringBuffer buff = new StringBuffer();        buff.append( "Hex " )            .append( this.position.getBoardNum() )            .append( " of " )            .append( bldg.getName() );        if ( this.isIgnite ) {            buff.append( " (Ignite)" );        } else {            buff.append( " (Collapse)" );        }        this.name = buff.toString();        // Get the height of the hex.        // Note, this doesn't equal "ceiling()" for        // one Level high buildings in a woods hex.        IHex targetHex = board.getHex( this.position );        this.elevation = targetHex.getElevation();        this.height = Math.max(targetHex.terrainLevel( Terrains.BLDG_ELEV ) - 1,                targetHex.terrainLevel(Terrains.BRIDGE_ELEV));    }