Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Comments in PGN files -- Please help (programming question)

Author: Odd Gunnar Malin

Date: 15:31:24 01/29/02

Go up one level in this thread


On January 29, 2002 at 15:05:45, Tim Foden wrote:

>So, I have a couple of questions which I hope someone may be able to answer :)
>
>1.  In the absence of a standard way of dealing with the comments situation
>    above, what do other people do in their programs?  Maybe I should add a
>    specific Variation class, and if a comment comes before the first move
>    in a variation, I could add it to this.
>

I do this also with positions-object but my indexes to the next position is a
moveobject.

Game
  Info
  Position
    Move --> Position
               Move
    Move

Every position have a comment field and every move have a comment-field too.
I have not been thinking of this comment before a move and use my movecomment
for !?, ! etc. but there is of course easy to use a movecommentbefore and
movecommentafter instead of only a movecomment.

Another way is a method I use in the PGN-parser, where I thread every variation
as a new game and let the game-object also have game object inside.


>2.  Is there a more up-to-date PGN spec than the one I have dated 1994.03.12?
>    If there is, does it say more about comments than the one I have?
>

Not official but there was a list for extending the nag values on RGCC some
times ago.

Here is clip from my NagValues.h, the nagvalues are 139, 140, ...

// The NAG value below 139 is comming from Andrew Templeton on rgcc
     "with the idea",
     "aimed against",
     "better is",
     "worse is",
     "equal is",
     "RR",
     "N",
     "weak point",
     "endgame",
     "line",
     "diagonal",
     "White has pair of bishops",
     "Black has pair of bishops",
     "Bishops of opposite color",
     "Bishops of same color",
     "White has united pawns",
     "Black has united pawns",
     "White has separated pawns",
     "Black has separated pawns",
     "White has doubled pawns",
     "Black has doubled pawns",
     "White has passed pawn",
     "Black has passed pawn",
     "White has adv. in no. pawns",
     "Black has adv. in no. pawns"
}

Odd Gunnar



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.