public void updateGuns() { try { int i = 0; // System.out.println("Nro guns: ..............."+gunList.size()); for (Gun gun : gunList) { if (gun.getYM() <= 0) { gunList.remove(gun); } // System.out.println("Gun nro: "+i+";......................ym= "+gun.getYM()+"; xm= // "+gun.getXM()); i++; } } catch (Exception e) { System.out.println("error in the updateGuns!!!!"); } }