Basic HexColor utilities. More...
Functions | |
| bool | isValidColor (HexColor color) |
| Returns true if color is one of BLACK, WHITE, or EMPTY. | |
| bool | isBlackWhite (HexColor color) |
| Returns true if color is BLACK or WHITE. | |
| std::string | toString (HexColor color) |
| Returns a string representation of the given HexColor. | |
| HexColor | otherColor (HexColor color) |
| Returns the opposite color for BLACK and WHITE, EMPTY for EMPTY. | |
Basic HexColor utilities.
| bool HexColorUtil::isBlackWhite | ( | HexColor | color | ) | [inline] |
Returns true if color is BLACK or WHITE.
Definition at line 134 of file HexColor.hpp.
Referenced by StoneBoard::AddColor(), HexPointUtil::colorEdge1(), HexPointUtil::colorEdge2(), StoneBoard::GetPlayed(), HexSgUtil::HexColorToSgColor(), StoneBoard::IsColor(), HexPointUtil::isColorEdge(), EndgameUtils::MovesToConsider(), EndgameUtils::PlayDeterminedState(), StoneBoard::PlayMove(), StoneBoard::RemoveColor(), HandCodedPattern::set(), StoneBoard::SetColor(), ZobristHash::Update(), PatternState::Update(), and PatternState::UpdateRingGodel().
| bool HexColorUtil::isValidColor | ( | HexColor | color | ) | [inline] |
Returns true if color is one of BLACK, WHITE, or EMPTY.
Definition at line 128 of file HexColor.hpp.
References BLACK, EMPTY, and WHITE.
Referenced by HexColorSetUtil::ColorOrEmpty(), StoneBoard::GetColor(), HexColorSetUtil::InSet(), HexColorSetUtil::NotColor(), HexColorSetUtil::Only(), otherColor(), StoneBoard::SetColor(), and toString().
Returns the opposite color for BLACK and WHITE, EMPTY for EMPTY.
Definition at line 149 of file HexColor.hpp.
References BLACK, EMPTY, HexAssert, isValidColor(), and WHITE.
Referenced by operator!().
| std::string HexColorUtil::toString | ( | HexColor | color | ) | [inline] |
Returns a string representation of the given HexColor.
Definition at line 140 of file HexColor.hpp.
References BLACK, HexAssert, isValidColor(), and WHITE.
Referenced by Logger::Flush(), HexUctState::GenerateAllMoves(), operator<<(), and StoneBoard::Write().