@@ -0,0 +1,2377 @@
+package com.secondthorn.solitaireplayer.solvers.tripeaks;%0A%0Aimport java.io.IOException;%0Aimport java.net.URISyntaxException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Paths;%0Aimport java.util.List;%0A%0A/**%0A * Prints out solutions for the random decks.%0A */%0Apublic class RandomDeckSolutions %7B%0A    public static void main(String%5B%5D args) %7B%0A        List%3CString%3E lines;%0A        try %7B%0A            lines = readLinesFromFile(%22random-decks.txt%22);%0A        %7D catch (IOException %7C URISyntaxException ex) %7B%0A            ex.printStackTrace();%0A            return;%0A        %7D%0A        System.out.println(%22Board Challenge Solver%22);%0A        printSolutions(lines, new BoardChallengeSolver());%0A        System.out.println(%22Score Challenge Solver%22);%0A        printSolutions(lines, new ScoreChallengeSolver(ScoreChallengeSolver.MAX_POSSIBLE_SCORE, 0));%0A        System.out.println(%22Card Challenge Solver%22);%0A        printSolutions(lines, new CardChallengeSolver(12, 'A', 0));%0A    %7D%0A%0A    private static void printSolutions(List%3CString%3E lines, TriPeaksSolver solver) %7B%0A        for (int i=0; i%3Clines.size(); i++) %7B%0A            Solution solution = solver.solve(new Deck(lines.get(i)), State.INITIAL_STATE);%0A            System.out.println(String.format(%22(%25d %5C%22%25s%5C%22 %25s)%22,%0A                    i+1, solution.getDescription(), actionsToCardList(solution.getActions())));%0A        %7D%0A    %7D%0A%0A    private static List%3CString%3E readLinesFromFile(String filename) throws IOException, URISyntaxException %7B%0A        return Files.readAllLines(Paths.get(ClassLoader.getSystemResource(filename).toURI()));%0A    %7D%0A%0A    private static String actionsToCardList(List%3CAction%3E actions) %7B%0A        StringBuilder sb = new StringBuilder();%0A        sb.append(%22(%22);%0A        for (Action action : actions) %7B%0A            switch (action.getCommand()) %7B%0A                case DRAW:%0A                case REMOVE:%0A                    sb.append(%22%5C%22%22);%0A                    sb.append(action.getCard());%0A                    sb.append(%22%5C%22 %22);%0A                    break;%0A                default:%0A                    throw new RuntimeException(%22Only DRAW or REMOVE should be in the solution for fully known decks%22);%0A            %7D%0A        %7D%0A        int lastIndex = sb.length() - 1;%0A        if (sb.charAt(lastIndex) == ' ') %7B%0A            sb.setCharAt(lastIndex, ')');%0A        %7D else %7B%0A            sb.append(%22)%22);%0A        %7D%0A        return sb.toString();%0A    %7D%0A%7D%0A

Add a tester to play through random decks.