If the last move terminates the game (e.g. checkmate or stalemate), set the result automatically (1-0, 0-1, 1/2-1/2). The pgn method already uses the Result header, so setting the header would be enough.