ArrayList<EcmBubble> list = new ArrayList();
ArrayList<EcmBubble> list = new ArrayList<EcmBubble>();
    public void updateEcmList() {        ArrayList<EcmBubble> list = new ArrayList();        for(Enumeration e = game.getEntities();e.hasMoreElements();) {            Entity ent = (Entity)e.nextElement();            if(ent.getPosition() == null || !ent.isDeployed() || ent.isOffBoard()) {                continue;            }            int range = ent.getECMRange();            if(range != Entity.NONE) {                int tint = PlayerColors.getColorRGB(ent.getOwner().getColorIndex());                list.add(new EcmBubble(ent.getPosition(), range, tint));            }        }        Hashtable<Coords, Integer> table = new Hashtable();        for(EcmBubble b : list) {            Integer col = new Integer(b.tint);            for(int x=-b.range;x<=b.range;x++) {                for(int y=-b.range;y<=b.range;y++) {                    Coords c = new Coords(x+b.x,y+b.y);                    //clip rectangle to hexagon                    if(b.distance(c) <= b.range) {                        Integer tint = table.get(c);                         if(tint == null) {                            table.put(c, col);                        } else if (tint.intValue() != b.tint) {                            int red1 = (tint.intValue() >> 16) & 0xff;                            int green1 = (tint.intValue() >> 8) & 0xff;                            int blue1 = tint.intValue() & 0xff;                            int red2 = (b.tint >> 16) & 0xff;                            int green2 = (b.tint >> 8) & 0xff;                            int blue2 = b.tint & 0xff;                            red1 = (red1 + red2) / 2;                            green1 = (green1 + green2) / 2;                            blue1 = (blue1 + blue2) / 2;                            table.put(c, new Integer((red1 << 16) | (green1 << 8) | blue1));                        }                    }                }            }        }        synchronized(this) {            ecmHexes = table;            dirtyBoard = true;        }        repaint(100);    }