Set, the card game: Difference between revisions
→{{header|Java}}
(New post.) |
|||
Line 173:
private static List<Card> createPackOfCards() {
List<Card> pack = new ArrayList<Card>(81);
for ( Number number : Number.values() ) {
for ( Colour colour : Colour.values() ) {
Line 198:
}
private static <T> List<List<T>> combinations(List<T> list, int
List<List<T>> combinations = new ArrayList<List<T>>();
List<Integer> combination = IntStream.range(0,
while ( combination.get(
combinations.add(combination.stream().map( i -> list.get(i) ).toList());
int
while (
}
combination.set(
for ( int i =
combination.set(i, combination.get(i - 1) + 1);
}
|