Component[] clist = parent.getComponents();
HashMap<Value, Integer> numbers = new HashMap<Card.Value, Integer>();
int current_max = 0;
for(Value v : Card.Value.values()) numbers.put(v,0);
for(Component c : clist) {
Value cval = ((CardPanel)c).getCard().getValue();
numbers.put(cval, numbers.get(cval)+1);
if(numbers.get(cval) > current_max) current_max = numbers.get(cval);
}
return current_max;
}