
package ch.hearc.pokerface.gameengine.subsets;

import ch.hearc.pokerface.gameengine.cards.Card;


public class Pocket extends CardSubset
{
	/*------------------------------------------------------------------*\
	|*							Constructeurs							*|
	\*------------------------------------------------------------------*/

	public Pocket()
	{
		super();
	}

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	@Override
	public void add(Card c)
	{
		if (size() < 2)
		{
			super.add(c);
		}
	}
}


@@ -95,16 +95,71 @@
 .Card;%0D%0A
+import ch.hearc.pokerface.gameengine.cards.CardColor;%0D%0A
 %0D%0A%0D%0Apubl
@@ -603,16 +603,438 @@
 --*/%0D%0A%0D%0A
+%09public String getKey()%0D%0A%09%7B%0D%0A%09%09StringBuilder stringBuilder = new StringBuilder(%22%22);%0D%0A%0D%0A%09%09CardColor color = this.iterator().next().getColor();%0D%0A%09%09boolean sameColor = true;%0D%0A%09%09for(Card c:this)%0D%0A%09%09%7B%0D%0A%09%09%09if (c.getColor() != color)%0D%0A%09%09%09%7B%0D%0A%09%09%09%09sameColor = false;%0D%0A%09%09%09%7D%0D%0A%09%09%09stringBuilder.append(c.getValue().getStringValue());%0D%0A%09%09%7D%0D%0A%0D%0A%09%09stringBuilder.append((sameColor) ? %22s%22 : %22o%22);%0D%0A%0D%0A%09%09return stringBuilder.toString();%0D%0A%09%7D%0D%0A%0D%0A
 %09@Overri

Add method getKey