55085509551055115512551355145515551655175518
for (int i=0; i<list.size(); i++) { CardSim currentCard = list.getCard(i); if (ret.countID(currentCard) <maxSame) { ret.addCard(currentCard); } }