@@ -0,0 +1,1096 @@
+package util.game;%0D%0A%0D%0Aimport java.io.File;%0D%0Aimport java.util.HashSet;%0D%0Aimport java.util.List;%0D%0Aimport java.util.Set;%0D%0A%0D%0Aimport util.gdl.grammar.Gdl;%0D%0Aimport util.kif.KifReader;%0D%0A%0D%0A/**%0D%0A * Test game repository that provides rulesheet-only access to games with no%0D%0A * associated metadata or other resources, to be used only for unit tests.%0D%0A * %0D%0A * @author Sam%0D%0A */%0D%0Apublic final class TestGameRepository extends GameRepository %7B%0D%0A    protected Set%3CString%3E getUncachedGameKeys() %7B%0D%0A        Set%3CString%3E theKeys = new HashSet%3CString%3E();%0D%0A        for(File game : new File(%22games/test%22).listFiles()) %7B%0D%0A            if(!game.getName().endsWith(%22.kif%22)) continue;%0D%0A            theKeys.add(game.getName().replace(%22.kif%22, %22%22));%0D%0A        %7D%0D%0A        return theKeys;%0D%0A    %7D%0D%0A    %0D%0A    protected Game getUncachedGame(String theKey) %7B%0D%0A    %09try %7B%0D%0A    %09%09List%3CGdl%3E theRules = KifReader.read(new File(%22games/test/%22 + theKey + %22.kif%22).getAbsolutePath());%0D%0A    %09%09return new Game(theKey, null, null, null, null, theRules);%0D%0A    %09%7D catch (Exception e) %7B%0D%0A    %09%09throw new RuntimeException(e);%0D%0A    %09%7D        %0D%0A    %7D%0D%0A%7D

Add a game repository specifically for unit tests, that can provide a listing of all of the available test games and load rulesheet-only versions of specific games.