Beispiel #1
0
        public ChessGame Parse(IEnumerable<String> pgn, IChessMoveNotation moveNotation)
        {
            var lines = pgn.GetEnumerator();
            var metainfo = ParseTags(lines);
            var movetext = ParseMovetext(lines);
            var game = new ChessGame(metainfo);

            foreach (ChessMove cm in ParseMoves(movetext, moveNotation, game.Players))
                game.AddMove(cm);

            return game;
        }