Esempio n. 1
0
        public static void TestParsingNagSymbols()
        {
            var parser    = new PGNParser();
            var game      = parser.GetGamesFromPGNAsync(PGNResources.MoveNagSymbol).Result;
            var formatter = new PgnFormatter <Move>(new PGNFormatterOptions());

            formatter.BuildPgn(game.First());
        }
Esempio n. 2
0
        private static void WriteGame(Game[] games, int i)
        {
            if (i >= games.Length)
            {
                System.Console.WriteLine($"Requested game at index {i} not found. Length is {games.Length}.");
                return;
            }

            var game         = games[i];
            var pgnFormatter = new PgnFormatter <Move>(new PGNFormatterOptions
            {
                ExportFormat = true
            });
            var pgn = pgnFormatter.BuildPgn(game);

            System.Console.WriteLine(pgn);
            File.WriteAllText("C:\\temp\\test.pgn", pgn);
        }