public Card[][] getSets()
	{
		int count = cards.size();
		if (count < 3)
			return new Card[0][];
		
		ArrayList<Card[]> sets = new ArrayList<Card[]>();
		for (int i = 0; i < count; i++)
		{
			for (int j = i + 1; j < count; j++)
			{
				for (int k = j + 1; k < count; k++)
				{
					Card[] set = {cards.get(i), cards.get(j), cards.get(k)};
					if (isSet(set))
						sets.add(set);
				}
			}
		}
		
		Card[][] result = new Card[sets.size()][3];
		sets.toArray(result);
		return result;
	}