Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Functions

GoStaticLadder Namespace Reference

Fast ladder computations that do not play actual moves on the board. More...

Functions

bool IsEdgeLadder (const GoBoard &bd, SgPoint target, SgBlackWhite toPlay)
 Return true, if block can be captured in a ladder running along the edge.
bool IsLadder (const GoBoard &bd, SgPoint target, SgBlackWhite toPlay)
 Return true, if block can be captured in a ladder.

Detailed Description

Fast ladder computations that do not play actual moves on the board.

Can be used where speed is of high importance (e.g. MC playouts). They detect only the subset of the ladders detected in GoLadder, in which the ladder path is free of stones.


Function Documentation

bool GoStaticLadder::IsEdgeLadder ( const GoBoard bd,
SgPoint  target,
SgBlackWhite  toPlay 
)

Return true, if block can be captured in a ladder running along the edge.

Definition at line 15 of file GoStaticLadder.cpp.

References SgPointUtil::Col(), GoBoard::GetColor(), GoBoard::IsEmpty(), GoBoard::Line(), GoBoard::NumEmptyNeighbors(), GoBoard::NumLiberties(), GoBoard::NumNeighbors(), SG_ASSERT, SG_NS, SG_NULLMOVE, SG_WE, GoBoard::Size(), and GoBoard::TheLiberty().

Referenced by IsLadder().

bool GoStaticLadder::IsLadder ( const GoBoard bd,
SgPoint  target,
SgBlackWhite  toPlay 
)

Return true, if block can be captured in a ladder.

Definition at line 103 of file GoStaticLadder.cpp.

References IsEdgeLadder().

Referenced by GoGtpExtraCommands::CmdStaticLadder().


Sun Mar 13 2011 Doxygen 1.7.1