Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoLadder.h File Reference


Detailed Description

Fast ladder algorithm, computes ladders and snapbacks.

Note:
Will become obsolete when class GoBoard is fast enough for computing ladders.

Definition in file GoLadder.h.

#include "GoBoard.h"
#include "SgBoardColor.h"
#include "GoModBoard.h"
#include "SgPoint.h"
#include "SgPointSet.h"
#include "SgVector.h"

Go to the source code of this file.

Namespaces

namespace  GoLadderUtil

Classes

class  GoLadder
 This class contains all the ladder-specific stuff. More...

Enumerations

enum  GoLadderStatus { GO_LADDER_UNKNOWN, GO_LADDER_CAPTURED, GO_LADDER_UNSETTLED, GO_LADDER_ESCAPED }

Functions

bool GoLadderUtil::Ladder (const GoBoard &board, SgPoint prey, SgBlackWhite toPlay, bool fTwoLibIsEscape=false, SgVector< SgPoint > *sequence=0)
 Return whether or not the block at 'prey' can be captured in a ladder when 'toPlay' plays first.
GoLadderStatus GoLadderUtil::LadderStatus (const GoBoard &bd, SgPoint prey, bool fTwoLibIsEscape=false, SgPoint *toCapture=0, SgPoint *toEscape=0)
 Return whether the block at 'prey' is captured, escaped, or unsettled with regards to capture in a ladder.
bool GoLadderUtil::IsProtectedLiberty (const GoBoard &bd, SgPoint liberty, SgBlackWhite col, bool &byLadder, bool &isKoCut, bool tryLadder=true)
 Check if this is a chain connection point, or a ko cut point.
bool GoLadderUtil::IsProtectedLiberty (const GoBoard &bd, SgPoint liberty, SgBlackWhite col)
 Simple form, calls the complex form and ignores bool results.
SgPoint GoLadderUtil::TryLadder (const GoBoard &bd, SgPoint prey, SgBlackWhite firstPlayer)
 try to escape/capture prey block Possible return values:
  • SG_PASS if already escaped/captured
  • the point to play
  • SG_NULLMOVE in case of failure


Enumeration Type Documentation

enum GoLadderStatus

Enumerator:
GO_LADDER_UNKNOWN  Don't know anything about the status of this block.
GO_LADDER_CAPTURED  Definitely captured, regardless of who plays first.
GO_LADDER_UNSETTLED  Capture or escape depends on who plays first.
GO_LADDER_ESCAPED  Definitely escaped, regardless of who plays first.

Definition at line 23 of file GoLadder.h.


17 Jun 2010 Doxygen 1.4.7