SgfParser { public void sgfToBoard(String filepath, Board board) { if (!filepath.toLowerCase().endsWith(".sgf")) { System.err.println(filepath + " is not an sgf file!"); } else { File file = new File(filepath); sgfToBoard(file, board); } } SgfParser(CoordinateSystem coords, boolean breakOnFirstPass); @SuppressWarnings("boxing") static void main(String[] args); void sgfToBoard(String filepath, Board board); void sgfToBoard(File file, Board board); List<Short> parseGameFromFile(File file); List<List<Short>> parseGamesFromFile(File file, int maxBookDepth); short sgfToPoint(String label);  }
@Test public void testCgtc(){ String[] diagram = { "...................", "..........#........", ".....O......#.#....", "...O....O.O....#...", "...................", "...#............#..", "...............O#..", "..O.............O..", "...............#...", "..O................", "..............#.#..", "...O...............", "...................", "...................", "..O................", "......O.......#.#..", "...O....O..#.......", "...................", "...................", }; parser.sgfToBoard("sgf-test-files/19/blunder.1.sgf", board); assertEquals(StoneColor.BLACK, board.getColorToPlay()); assertEquals(TestingTools.asOneString(diagram), board.toString()); }