class SgfParser {

	public List<List<Short>> parseGamesFromFile(File file, int maxBookDepth) {
		final List<List<Short>> games = new ArrayList<>();
		String input = "";
		try (Scanner s = new Scanner(file)) {
			while (s.hasNextLine()) {
				input += s.nextLine();
			}
			input = input.replace("W[]", "W[tt]");
			input = input.replace("B[]", "B[tt]");
			final StringTokenizer stoken = new StringTokenizer(input, ")[];");
			while (stoken.hasMoreTokens()) {
				final String token = stoken.nextToken();
				if (token.equals("(")) {
					final List<Short> game = parseGame(stoken, maxBookDepth);
					if (game != null) {
						games.add(game);
					}
				}
			}
			return games;
		} catch (final FileNotFoundException e) {
			System.err.println("File not found!");
			e.printStackTrace();
			System.exit(1);
		}
		return null;
	}

	public  SgfParser(CoordinateSystem coords, boolean breakOnFirstPass);

}