Utilities on VCs. More...
Functions | |
bitset_t | GetMustplay (const HexBoard &brd, HexColor color) |
Returns mustplay for color to move. | |
bool | ValidEdgeBridge (const StoneBoard &brd, const bitset_t &carrier, HexPoint &endpoint, HexPoint &edge) |
Returns true if carrier defines a valid bridge to the edge. |
Utilities on VCs.
Returns mustplay for color to move.
Definition at line 15 of file VCUtils.cpp.
References HexPointUtil::colorEdge1(), HexPointUtil::colorEdge2(), HexBoard::Cons(), EMPTY_BITSET, VCSet::Exists(), VC::FULL, StoneBoard::GetEmpty(), VCSet::GetList(), HexBoard::GetPosition(), VCList::hardIntersection(), and VC::SEMI.
Referenced by VCCommands::CmdGetMustPlay(), and DfsSolver::OrderMoves().
bool VCUtils::ValidEdgeBridge | ( | const StoneBoard & | brd, | |
const bitset_t & | carrier, | |||
HexPoint & | endpoint, | |||
HexPoint & | edge | |||
) |
Returns true if carrier defines a valid bridge to the edge.
Edge and the other endpoint are stored if it is valid.
Definition at line 39 of file VCUtils.cpp.
References ConstBoard::Adjacent(), BitsetUtil::BitsetToVector(), StoneBoard::Const(), benzene_bitset< _Nb >::count(), StoneBoard::GetOccupied(), HexAssert, HexPointUtil::isEdge(), MIAI_SIZE, and ConstBoard::Nbs().