src/societal_level/CellSociety.java
private void removeUsedSpots(List<Location> available, ArrayList<Cell> newCells) {
		if (available == null || newCells == null || available.size() == 0 || newCells.size() == 0) {
			return;
		}

		for (int i = 0; i < available.size(); i++) {
			for (int j = 0; j < newCells.size(); j++) {
				if (available.get(i).equals(newCells.get(j).getMyLocation())) {
					available.remove(i);
					if (i > 0)
						i--;
					else
						break;
				}
			}
		}
	}
/**
	 * Iterate through both the available spots and the newly updated cells and
	 * remove any repeats from available, so that future cells will not update
	 * thinking that these spots are available (causing conflict)
	 * 
	 * @param available
	 *            Available spots in society
	 * @param newCells
	 *            Cells generated from update
	 */
Iterate through both the available spots and the newly updated cells and
remove any repeats from available, so that future cells will not update
thinking that these spots are available (causing conflict)

@param available
Available spots in society
@param newCells
Cells generated from update
Iterate through both the available spots and the newly updated cells and remove any repeats from available so that future cells will not update thinking that these spots are available ( causing conflict ) @param available Available spots in society @param newCells Cells generated from update
private void removeUsedSpots(List<Location> available, ArrayList<Cell> newCells) {
		if (available == null || newCells == null || available.size() == 0 || newCells.size() == 0) {
			return;
		}
		for (int i = 0; i < available.size(); i++) {
			for (int j = 0; j < newCells.size(); j++) {
				if (available.get(i).equals(newCells.get(j).getMyLocation())) {
					available.remove(i);
					if (i > 0)
						i--;
					else
						break;
				}
			}
		}
	}
private void removeUsedSpots ( List < Location > available , ArrayList < Cell > newCells ) { if ( available == null || newCells == null || available . size ( ) == 0 || newCells . size ( ) == 0 ) { return ; } for ( int i = 0 ; i < available . size ( ) ; i ++ ) { for ( int j = 0 ; j < newCells . size ( ) ; j ++ ) { if ( available . get ( i ) . equals ( newCells . get ( j ) . getMyLocation ( ) ) ) { available . remove ( i ) ; if ( i > 0 ) i -- ; else break ; } } } }
Iterate through both the available spots and the newly updated cells and
 remove any repeats from available, so that future cells will not update
 thinking that these spots are available (causing conflict)
Iterate through both the available spots and the newly updated cells and remove any repeats from available so that future cells will not update thinking that these spots are available ( causing conflict )