Skip to content

When parsing a game that ends in checkmate from PGN, the game method is NoMethod #76

@TheNipanen

Description

@TheNipanen

It seems that game state is not properly updated when parsing a game from PGN. At least checkmate is not updated into the Game.method field when the game ends in checkmate. The following example code illustrates the issue.

pgn := "1. f4 e5 2. g4 Qh4# 0-1"
reader := strings.NewReader(pgn)
pgn_r, _ := chess.PGN(reader)
game := chess.NewGame(pgn_r)
// Now game.method is NoMethod

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions