gameFromPgn function

Game gameFromPgn(
  1. String pgn, {
  2. Variant? variant,
  3. String? startPosition,
  4. bool strictVariantTag = true,
})

Parses a pgn and builds a game from it. If variant is not supplied, the parser will look for a variant tag.

Implementation

Game gameFromPgn(
  String pgn, {
  Variant? variant,
  String? startPosition,
  bool strictVariantTag = true,
}) =>
    gameFromPgnData(
      parsePgn(pgn),
      variant: variant,
      startPosition: startPosition,
      strictVariantTag: strictVariantTag,
    );