Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Namespaces | Functions | Variables

GoEyeUtil.h File Reference

GoBoard eye-related utility classes. More...

#include "GoBoard.h"
#include "GoBoardUtil.h"
#include "SgPoint.h"

Go to the source code of this file.

Namespaces

namespace  GoEyeUtil

Functions

int GoEyeUtil::DegreeCode (const SgPointSet &points)
 Code for how many points of each degree there are.
long GoEyeUtil::DegreeCode8 (const SgPointSet &points)
 Like DegreeCode, but also count diagonal neighbors.
template<class BOARD >
SgPoint GoEyeUtil::EmptyNeighbor (const BOARD &bd, SgPoint p)
 Return an empty neighbor of p.
bool GoEyeUtil::IsNakadeShape (const SgPointSet &area)
 Check if area is one of the classical nakade shapes: ,**,***, **, ***, **, ***, * , * .
bool GoEyeUtil::IsSimpleEye (const GoBoard &bd, SgPoint p, SgBlackWhite c)
 Check if point is a single point eye with one or two adjacent blocks.
bool GoEyeUtil::IsSinglePointEye (const GoBoard &bd, SgPoint p, SgBlackWhite c)
bool GoEyeUtil::IsPossibleEye (const GoBoard &board, SgBlackWhite color, SgPoint p)
 Return true if a point can become an eye by adding one more defender's move.
bool GoEyeUtil::CanBecomeSinglePointEye (const GoBoard &board, SgPoint p, const SgPointSet &oppSafe)
 Given opponent's safe stones, can p ever become an eye? Checks direct and diagonal neighbors.
template<class BOARD >
bool GoEyeUtil::MakesNakadeShape (const BOARD &bd, SgPoint p, SgBlackWhite toPlay)
 does playing at p create one of the standard nakade shapes?
bool GoEyeUtil::NumberOfMoveToEye (const GoBoard &bd, SgBlackWhite c, SgPoint p, int &number)
 Return true if a point can become an eye by adding number of defender's move.
bool GoEyeUtil::IsSinglePointEye2 (const GoBoard &bd, SgPoint p, SgBlackWhite c)
 As IsSinglePointEye, but allows diagonal points to be eyes.
bool GoEyeUtil::IsSinglePointEye2 (const GoBoard &bd, SgPoint p, SgBlackWhite c, SgVector< SgPoint > &eyes)
 As IsSinglePointEye2, but specifying points assumed to be eyes.
template<class BOARD >
bool GoEyeUtil::IsTwoPointEye (const BOARD &bd, SgPoint p, SgBlackWhite c)
 p is in a 2 point eye surrounded by a single chain
bool GoEyeUtil::NumberOfMoveToEye2 (const GoBoard &bd, SgBlackWhite c, SgPoint p, int &nummoves)
 As NumberOfMoveToEye2, but includes existing diagonal eyes, and allows opponent stones to be captured.
int GoEyeUtil::CountSinglePointEyes2 (const GoBoard &bd, SgPoint p)
 Count number of single point eyes for block p.
bool GoEyeUtil::SinglePointSafe2 (const GoBoard &bd, SgPoint p)
 Does block at p have two or more single point eyes?
bool GoEyeUtil::IsSplitPt (SgPoint p, const SgPointSet &s)
 Does removing p split s into two or more parts?
bool GoEyeUtil::IsLocalSplitPt (SgPoint p, const SgPointSet &set)
 Does p locally,within a 3x3 region, split its neighbors in s? Even if the reply is 'yes', s might still be connected outside the region.
bool GoEyeUtil::IsTreeShape (const SgPointSet &area)
 Area is tree shape if it does not contain a 2x2 square.
bool GoEyeUtil::IsVitalPt (const SgPointSet &points, SgPoint p, SgBlackWhite opp, const GoBoard &bd)
 Vital point in small shape - usually has most liberties See implementation for details.
void GoEyeUtil::TestNakade (const SgPointSet &points, const GoBoard &bd, SgBlackWhite color, bool isFullyEnclosed, bool &isNakade, bool &makeNakade, bool &makeFalse, bool &maybeSeki, bool &sureSeki, SgPoint *vital)
 Analyze small region locally for number of eyes.
bool GoEyeUtil::CheckInterior (const GoBoard &bd, const SgPointSet &area, SgBlackWhite opp, bool checkBlocks)

Variables

const int GoEyeUtil::NAKADE_LIMIT = 6
 size of largest standard nakade shape

Detailed Description

GoBoard eye-related utility classes.

Definition in file GoEyeUtil.h.


Sun Mar 13 2011 Doxygen 1.7.1