@@ -0,0 +1,1084 @@
+package com.tom_e_white.set_game;%0A%0Aimport java.awt.image.BufferedImage;%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.text.ParseException;%0Aimport java.util.List;%0Aimport java.util.Set;%0Aimport java.util.stream.Collectors;%0A%0A/**%0A * Use %7B@link CardPredictor%7D to play Set.%0A */%0Apublic class PlaySet %7B%0A%0A    public static void play(File testFile) throws IOException, ParseException %7B%0A        CardDetector cardDetector = new CardDetector();%0A        CardPredictor cardPredictor = new CardPredictor();%0A        List%3CBufferedImage%3E images = cardDetector.scan(testFile.getAbsolutePath(), false);%0A%0A        List%3CCard%3E cards = images.stream().map(image -%3E %7B%0A            try %7B%0A                return cardPredictor.predict(image);%0A            %7D catch (IOException %7C ParseException e) %7B%0A                throw new RuntimeException(e);%0A            %7D%0A        %7D).collect(Collectors.toList());%0A%0A        Set%3CTriple%3E sets = Cards.sets(cards);%0A%0A        sets.forEach(System.out::println);%0A    %7D%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        play(new File(args%5B0%5D));%0A    %7D%0A%7D%0A

Add a program to play Set