stringsIndex += 1;   if ( mhex.contains(Terrain.RUBBLE) ) { strings[stringsIndex] = "Rubble"; stringsIndex += 1; } }   if ( mhex.contains(Terrain.BUILDING) ) { StringBuffer buf = new StringBuffer( "Height " ); buf.append( mhex.levelOf(Terrain.BLDG_ELEV) ); switch ( mhex.levelOf(Terrain.BUILDING) ) { case 1: buf.append( " Light " ); break; case 2: buf.append( " Medium " ); break; case 3: buf.append( " Heavy " ); break; case 4: buf.append( " Hardened " ); break; } buf.append( "building, CF: " ); buf.append( mhex.levelOf(Terrain.BLDG_CF) ); strings[stringsIndex] = buf.toString();
    private String[] getTipText(Point point) {        int stringsSize = 0;        // first, we have to determine how much text we are going to have        // are we on a hex?        final Coords mcoords = getCoordsAt(point);        if (game.board.contains(mcoords)) {            stringsSize += 1;        }        // check if it's on any entities        for (Iterator i = entitySprites.iterator(); i.hasNext();) {            final EntitySprite eSprite = (EntitySprite)i.next();            if (eSprite.isInside(point)) {                stringsSize += 3;            }        }        // check if it's on any attacks        for (Iterator i = attackSprites.iterator(); i.hasNext();) {            final AttackSprite aSprite = (AttackSprite)i.next();            if (aSprite.isInside(point)) {                stringsSize += 1 + aSprite.weaponDescs.size();            }        }                // if the size is zip, you must a'quit        if (stringsSize == 0) {            return null;        }        // now we can allocate an array of strings        String[] strings = new String[stringsSize];        int stringsIndex = 0;        // are we on a hex?        if (game.board.contains(mcoords)) {            Hex mhex = game.board.getHex(mcoords);            strings[stringsIndex] = "Hex " + mcoords.getBoardNum()                         + "; level " + mhex.getElevation();//                        + "; " + Terrain.TERRAIN_NAMES[mhex.getTerrainType()];            stringsIndex += 1;        }        // check if it's on any entities        for (Iterator i = entitySprites.iterator(); i.hasNext();) {            final EntitySprite eSprite = (EntitySprite)i.next();            if (eSprite.isInside(point)) {                final String[] entityStrings = eSprite.getTooltip();                java.lang.System.arraycopy(entityStrings, 0, strings, stringsIndex, entityStrings.length);                stringsIndex += entityStrings.length;            }        }                // check if it's on any attacks        for (Iterator i = attackSprites.iterator(); i.hasNext();) {            final AttackSprite aSprite = (AttackSprite)i.next();            if (aSprite.isInside(point)) {                final String[] attackStrings = aSprite.getTooltip();                java.lang.System.arraycopy(attackStrings, 0, strings, stringsIndex, attackStrings.length);                stringsIndex += 1 + aSprite.weaponDescs.size();            }        }        return strings;    }