public void collapseBuilding(Building bldg){
  buildings.removeElement(bldg);
  Enumeration<Coords> bldgCoords=bldg.getCoords();
  while (bldgCoords.hasMoreElements()) {
    final Coords coords=bldgCoords.nextElement();
    collapseBuilding(coords);
  }
}

public void collapseBuilding ( Building bldg ) { buildings . removeElement ( bldg ) ; Enumeration < Coords > bldgCoords = bldg . getCoords ( ) ; while ( bldgCoords . hasMoreElements ( ) ) { final Coords coords = bldgCoords . nextElement ( ) ; collapseBuilding ( coords ) ; } }
the given building has collapsed . remove it from the board and replace it with rubble .
