Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoLadder.cpp File Reference


Detailed Description

Definition in file GoLadder.cpp.

#include "SgSystem.h"
#include "GoLadder.h"
#include <algorithm>
#include <memory>
#include "GoBoard.h"
#include "GoBoardUtil.h"
#include "GoModBoard.h"
#include "SgVector.h"
#include "SgStack.h"

Go to the source code of this file.

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)
 Simple form, calls the complex form and ignores bool results.
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.
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


Variables

const int GOOD_FOR_PREY = 1000
const int GOOD_FOR_HUNTER = -1000


Variable Documentation

const int GOOD_FOR_HUNTER = -1000 [static]

Definition at line 27 of file GoLadder.cpp.

Referenced by GoLadder::HunterLadder(), GoLadder::Ladder(), and GoLadder::PlayPreyMove().

const int GOOD_FOR_PREY = 1000 [static]

Definition at line 25 of file GoLadder.cpp.

Referenced by GoLadder::HunterLadder(), GoLadder::Ladder(), GoLadder::PlayHunterMove(), GoLadder::PlayPreyMove(), and GoLadder::PreyLadder().


17 Jun 2010 Doxygen 1.4.7