Core of Sudoku Puzzler is ported without input error detection (no try/catch statemen...
[IRC.git] / Robust / src / Tests / mlp / stephen / Test.java
index 04a6655c77dcc9156f9d98510fa6c9bff3074fbb..127c8857fbcec3be2e8623dca1f3b2a30a1e9b6c 100755 (executable)
@@ -19,11 +19,23 @@ public class Test
                {
                        Board b = new Board(data);
                        Board solved = Solver.go(b);
+                       System.out.println("Here's the best I could do:");
                        System.out.println(solved);
+                       writeResults(b.toString(), solved.toString());
                }
                
        }       
 
+    public void writeResults(String org, String solved)
+    {
+       FileOutputStream out = new FileOutputStream("out.txt");
+       out.write("Input puzzle:\n".getBytes());
+       out.write(org.getBytes());
+       out.write("\nProcessed Puzzle:\n".getBytes());
+       out.write(solved.getBytes());
+       out.close();
+    }
+
     public void doSomeWorkSolvingStaticPuzzle()
     {