Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

HexSgUtil.hpp File Reference

#include "SgBlackWhite.h"
#include "SgPoint.h"
#include "SgProp.h"
#include "SgNode.h"
#include "Hex.hpp"
#include "StoneBoard.hpp"

Go to the source code of this file.

Namespaces

namespace  HexSgUtil
 

Utilities to convert from/to Hex and Sg.


Functions

SgPoint HexSgUtil::HexPointToSgPoint (HexPoint p, int height)
 Converts a HexPoint to a SgPoint.
HexPoint HexSgUtil::SgPointToHexPoint (SgPoint p, int height)
 Converts from from a SgPoint to a HexPoint.
SgBlackWhite HexSgUtil::HexColorToSgColor (HexColor color)
 Converts a HexColor to SgBlackWhite, color must not equal EMPTY.
HexColor HexSgUtil::SgColorToHexColor (SgBlackWhite player)
 Converts a SgBlackWhite to a HexColor.
SgVector< SgPoint > HexSgUtil::BitsetToSgVector (const bitset_t &b, int height)
 Convert a bitset to an SgList of points.
void HexSgUtil::AddMoveToNode (SgNode *node, HexColor color, HexPoint cell, int height)
 Adds the move to the sg node; does proper conversions.
bool HexSgUtil::NodeHasSetupInfo (SgNode *node)
 Returns true if node constains any of the following properties: propAddBlack, propAddWhite, propAddEmpty, propPlayer.
void HexSgUtil::SetPositionInNode (SgNode *root, const StoneBoard &brd, HexColor color)
 Set the position setup properties of this node to encode the given board.
void HexSgUtil::GetSetupPosition (const SgNode *node, int height, std::vector< HexPoint > &black, std::vector< HexPoint > &white, std::vector< HexPoint > &empty)
 Puts the position in the given vectors.
void HexSgUtil::SetPositionInBoard (const SgNode *node, StoneBoard &brd)
 Sets node's position in the board.
bool HexSgUtil::WriteSgf (SgNode *tree, const char *filename, int boardsize)
 Write the given tree to a sgf file.

Detailed Description

Definition in file HexSgUtil.hpp.


6 Jan 2011 Doxygen 1.6.3