| www.delorie.com/gnu/docs/gnugo/gnugo_81.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
SGFNode *sgfAddStone(SGFNode *node, int color, int movex,
int movey)
Add a stone tonode. Properties added is eitherAB(black stone) orAW(white stone).
SGFNode *sgfAddPlay(SGFNode *node, int who, int movex, int
movey)
Add a child node with a move tonode. Properties added is eitherB(black move) orW(white move). A pass is coded by(-1, -1).This function does not add a property to the node itself, but adds a child node instead. If there are previous child nodes, the new node is placed before the other ones, so this function should be used if you want to add a main branch to the tree. To add a variation, use
sgfAddPlayLastinstead.
SGFNode *sgfAddPlayLast(SGFNode *node, int who, int movex,
int movey)
Add a child node with a move tonode. Properties added is eitherB(black move) orW(white move). A pass is coded by(-1, -1).If there are previous child nodes in
node, the move is added by adding the child node last, so this function should be used when you want to add a variation to the game tree.
int sgfPrintCharProperty(FILE *file, SGFNode *node, const
char *name)
Print the properties of typenameinnodeonfile.
int sgfPrintCommentProperty(FILE *file, SGFNode *node, const
char *name)
Print the comment properties of typenameinnodeonfile.
void sgfWriteResult(SGFNode *node, float score, int
overwrite)
Add aRE(result) property tonode. This property will contain the game result. Ifoverwriteis zero the result is written only if no previous result property exists.
SGFNode *sgfCircle(SGFNode *node, int i, int j)
Add aCR(circle) property at(i, j)tonode.
SGFNode *sgfSquare(SGFNode *node, int i, int j)
CallssgfMarkto add aMA(mark) property at(i, j)tonode.
SGFNode *sgfTriangle(SGFNode *node, int i, int j)
Add aTR(triangle) property at(i, j)tonode.
SGFNode *sgfMark(SGFNode *node, int i, int j)
Add aMA(mark) property at(i, j)tonode.
SGFNode *sgfAddComment(SGFNode *node, const char *comment)
Add aC(comment) property tonode.
SGFNode *sgfBoardText(SGFNode *node, int i, int j, const
char *text)
Add aLB(label) property at(i, j)tonode.
SGFNode *sgfBoardChar(SGFNode *node, int i, int j, char c)
Add aLB(label) property at(i, j)tonode. This functions is a utility function that converts the character to a string and callssgfBoardText.
SGFNode *sgfBoardNumber(SGFNode *node, int i, int j, int
number)
Add a numeric label at(i, j)by callingsgfBoardText.
SGFNode *sgfStartVariant(SGFNode *node)
Start a new variation in the game tree. This means that thenextpointer ofnodeis followed to the end of the list and a new node is inserted there. A pointer to the new node is returned.
SGFNode *sgfStartVariantFirst(SGFNode *node)
Same as sgfStartVariant, except that the node is placed first in
the list. This means that the new variation will be the main variation
of the game tree. Returns a pointer to the new node.
SGFNode *sgfAddChild(SGFNode *node)
Adds a child node to node. If there already are children, the new
node is placed last in the list. Returns a pointer to the new node.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |