private static Bean takeOut(ArrayList<Bean> list) {
		while (list.size() > 1) {
			//get two random beans
			Bean one = list.get((int) Math.random() * list.size());
			Bean two = list.get((int) Math.random() * list.size());
			//if they are both black
			if (one == Bean.BLACK && two == Bean.BLACK) {
				list.remove(Bean.BLACK);
			} else if (one == Bean.WHITE && two == Bean.WHITE) {
				//both white
				list.remove(Bean.WHITE);
				list.remove(Bean.WHITE);
				list.add((int) Math.random() * list.size(), Bean.BLACK);
			} else {
				//opposite colors
				list.remove(Bean.WHITE);
			}
		}
		//return result
		return list.get(0);
	}