} else if (entity instanceof GunEmplacement) { int twip = unitSize * 2 / 3; xPoints = new int[8]; yPoints = new int[8]; xPoints[0] = baseX - (twip / 2); yPoints[0] = baseY - (twip * 3 / 2); xPoints[1] = xPoints[0] - twip; yPoints[1] = yPoints[0] + twip; xPoints[2] = xPoints[1]; yPoints[2] = yPoints[1] + twip; xPoints[3] = xPoints[2] + twip; yPoints[3] = yPoints[2] + twip; xPoints[4] = xPoints[3] + twip; yPoints[4] = yPoints[3]; xPoints[5] = xPoints[4] + twip; yPoints[5] = yPoints[4] - twip; xPoints[6] = xPoints[5]; yPoints[6] = yPoints[5] - twip; xPoints[7] = xPoints[6] - twip; yPoints[7] = yPoints[6] - twip;
    private void paintUnit (Graphics g, Entity entity, boolean border) {        int baseX = entity.getPosition().x *(hexSide[zoom] + hexSideBySin30[zoom]) + leftMargin + hexSide[zoom];        int baseY = (2*entity.getPosition().y + 1 + entity.getPosition().x%2)* hexSideByCos30[zoom] + topMargin;        int [] xPoints;        int [] yPoints;        if (entity instanceof Mech) {            xPoints = new int[3];            yPoints = new int[3];            xPoints[0] = baseX;            yPoints[0] = baseY - unitSize;            xPoints[1] = baseX - unitSize;            yPoints[1] = baseY + unitSize / 2;            xPoints[2] = baseX + unitSize;            yPoints[2] = baseY + unitSize / 2;        } else if (entity instanceof VTOL) {            xPoints = new int[8];            yPoints = new int[8];            xPoints[0] = baseX - unitSize;            xPoints[1] = baseX - unitSize / 3;            xPoints[2] = baseX;            xPoints[3] = baseX + unitSize / 3;            xPoints[4] = baseX + unitSize;            xPoints[5] = xPoints[3];            xPoints[6] = xPoints[2];            xPoints[7] = xPoints[1];            yPoints[0] = baseY;            yPoints[1] = baseY - unitSize / 3;            yPoints[2] = baseY - unitSize;            yPoints[3] = baseY - unitSize / 3;            yPoints[4] = baseY;            yPoints[5] = baseY + unitSize / 3;            yPoints[6] = baseY + unitSize;            yPoints[7] = baseY + unitSize / 3;        } else if (entity instanceof Tank) {            xPoints = new int[4];            yPoints = new int[4];            xPoints[0] = baseX - unitSize * 2 / 3;            yPoints[0] = baseY - unitSize * 2 / 3;            xPoints[1] = baseX - unitSize * 2 / 3;            yPoints[1] = baseY + unitSize * 2 / 3;            xPoints[2] = baseX + unitSize * 2 / 3;            yPoints[2] = baseY + unitSize * 2 / 3;            xPoints[3] = baseX + unitSize * 2 / 3;            yPoints[3] = baseY - unitSize * 2 / 3;        }        else if (entity instanceof Protomech) {            xPoints = new int[3];            yPoints = new int[3];            xPoints[0] = baseX;            yPoints[0] = baseY + unitSize;            xPoints[1] = baseX + unitSize;            yPoints[1] = baseY - unitSize / 2;            xPoints[2] = baseX - unitSize;            yPoints[2] = baseY - unitSize / 2;        } else {            // entity instanceof Infantry            xPoints = new int[4];            yPoints = new int[4];            xPoints[0] = baseX;            yPoints[0] = baseY - unitSize;            xPoints[1] = baseX - unitSize;            yPoints[1] = baseY;            xPoints[2] = baseX;            yPoints[2] = baseY + unitSize;            xPoints[3] = baseX + unitSize;            yPoints[3] = baseY;        }        g.setColor (PlayerColors.getColor(entity.getOwner().getColorIndex()));        if (! entity.isSelectableThisTurn()) {            // entity has moved (or whatever) already            g.setColor (g.getColor().darker());        }        g.fillPolygon (xPoints, yPoints, xPoints.length);                Entity se = clientgui == null?null:m_game.getEntity(clientgui.getSelectedEntityNum());        if (entity == se) {            Color w = new Color (255,255,255);            Color b = new Color (0,0,0);            g.setColor (b);            g.drawRect (baseX-1, baseY-1, 3, 3);            g.setColor (w);            g.drawRect (baseX, baseY, 1, 1);        }        if (border) {            Color oldColor = g.getColor();            g.setColor (oldColor.darker().darker().darker());            g.drawPolygon (xPoints, yPoints, xPoints.length);            g.setColor (oldColor);        }    }