package sudoku;

import java.io.File;
import java.io.FileNotFoundException;

/**
 * <p>Runs {@code Solver} for each of a collection of sudoku 
 * puzzles.</p>
 * @author fiveham
 *
 */
public class RepetetiveTester {
	
	public static final String SADMAN_DIRECTORY = "./puzzles/sadman/";
	
	public static void main(String[] args) {
		File sadmanDir = new File(SADMAN_DIRECTORY);
		
		for(String sadman : sadmanDir.list()){
			File f = new File(SADMAN_DIRECTORY + sadman);
			
			try{
				Solver solver = new Solver(f);
				System.out.println(f.getName());
				solver.solve();
				System.out.println(solver.getTarget().toString());
			} catch(FileNotFoundException e){
				System.out.println("Could not find file "+f.getName());
			} catch(InterruptedException e){
				System.out.println("InterruptedException for file "+f.getName());
			}
		}
	}
}

@@ -68,16 +68,107 @@
 ception;
+%0Aimport java.util.List;%0Aimport java.util.stream.Collectors;%0Aimport java.util.stream.Stream;
 %0A%0A/**%0A *
@@ -376,194 +376,406 @@
 %22;%0A%09
-%0A%09public static void main(String%5B%5D args) %7B%0A%09%09File sadmanDir = new File(SADMAN_DIRECTORY);%0A%09%09%0A%09%09for(String sadman : sadmanDir.list())%7B%0A%09%09%09File f = new File(SADMAN_DIRECTORY + sadman);%0A%09%09%09
+public static final String EULER_DIRECTORY = %22./puzzles/project_euler/%22;%0A%09%0A%09public static void main(String%5B%5D args) %7B%0A%09%09List%3CFile%3E puzzles = Stream.of(new File(SADMAN_DIRECTORY).list()).map((s) -%3E new File(SADMAN_DIRECTORY + s)).collect(Collectors.toList());%0A%09%09Stream.of(new File(EULER_DIRECTORY).list()).map((s) -%3E new File(SADMAN_DIRECTORY + s)).forEach(puzzles::add);;%0A%09%09%0A%09%09for(File f : puzzles)%7B
 %0A%09%09%09

add euler puzzles to RepetetiveTester