00001 //---------------------------------------------------------------------------- 00002 /** @file GoStaticLadder.h 00003 */ 00004 //---------------------------------------------------------------------------- 00005 00006 #ifndef GO_STATICLADDER_H 00007 #define GO_STATICLADDER_H 00008 00009 #include "SgBlackWhite.h" 00010 #include "SgPoint.h" 00011 00012 class GoBoard; 00013 00014 //---------------------------------------------------------------------------- 00015 00016 /** Fast ladder computations that do not play actual moves on the board. 00017 Can be used where speed is of high importance (e.g. MC playouts). 00018 They detect only the subset of the ladders detected in GoLadder, 00019 in which the ladder path is free of stones. 00020 */ 00021 namespace GoStaticLadder 00022 { 00023 /** Return true, if block can be captured in a ladder running along the 00024 edge. 00025 */ 00026 bool IsEdgeLadder(const GoBoard& bd, SgPoint target, SgBlackWhite toPlay); 00027 00028 /** Return true, if block can be captured in a ladder. */ 00029 bool IsLadder(const GoBoard& bd, SgPoint target, SgBlackWhite toPlay); 00030 } 00031 00032 //---------------------------------------------------------------------------- 00033 00034 #endif // GO_STATICLADDER_H