Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

HexColorUtil Namespace Reference

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.

Detailed Description

Basic HexColor utilities.


Function Documentation

bool HexColorUtil::isBlackWhite ( HexColor  color  )  [inline]
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().

HexColor HexColorUtil::otherColor ( HexColor  color  )  [inline]

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().


6 Jan 2011 Doxygen 1.6.3