/**
 *
 */
package com.github.apixandru.games.rummikub;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author Alexandru-Constantin Bledea
 * @since Sep 16, 2015
 */
public final class CardGroup {

	private final List<Card> cards;

	CardGroup(final List<Card> cards) {
		this.cards = Collections.unmodifiableList(new ArrayList<>(cards));
	}

	/**
	 * @return
	 */
	public boolean isValid() {
		if (cards.size() < 3) {
			return false;
		}
		return true;
	}

}

@@ -488,12 +488,243 @@
 urn 
-true
+isValidGroup();%0A%09%7D%0A%0A%09/**%0A%09 * A valid group cannot have more than one color repeating%0A%09 *%0A%09 * @return%0A%09 */%0A%09private boolean isValidGroup() %7B%0A%09%09if (!Cards.isDifferentColors(cards)) %7B%0A%09%09%09return false;%0A%09%09%7D%0A%09%09return Cards.isSameRanks(cards)
 ;%0A%09%7D

add group logic