State of a point on the board for games with Black, White, Empty states. More...
#include <climits>
#include "SgBlackWhite.h"
#include <boost/static_assert.hpp>
Go to the source code of this file.
Classes | |
class | SgEBWIterator |
Iterator over three colors, Empty, Black and White. More... | |
Defines | |
#define | SG_ASSERT_EBW(c) SG_ASSERT(c == SG_BLACK || c == SG_WHITE || c == SG_EMPTY) |
#define | SG_ASSERT_COLOR(c) SG_ASSERT(c == SG_BLACK || c == SG_WHITE || c == SG_EMPTY || c == SG_BORDER) |
Typedefs | |
typedef int | SgEmptyBlackWhite |
SG_BLACK, SG_WHITE, or SG_EMPTY. | |
typedef int | SgBoardColor |
SG_BLACK, SG_WHITE, SG_EMPTY, or SG_BORDER. | |
Functions | |
BOOST_STATIC_ASSERT (SG_BLACK==0) | |
BOOST_STATIC_ASSERT (SG_WHITE==1) | |
BOOST_STATIC_ASSERT (SG_EMPTY==2) | |
bool | SgIsEmptyBlackWhite (SgBoardColor c) |
SgBoardColor | SgOpp (SgBoardColor c) |
char | SgEBW (SgEmptyBlackWhite color) |
Variables | |
const int | SG_EMPTY = 2 |
Empty point. | |
const int | SG_BORDER = 3 |
Border point (outside of playing area). |
State of a point on the board for games with Black, White, Empty states.
Definition in file SgBoardColor.h.
#define SG_ASSERT_COLOR | ( | c | ) | SG_ASSERT(c == SG_BLACK || c == SG_WHITE || c == SG_EMPTY || c == SG_BORDER) |
Definition at line 39 of file SgBoardColor.h.
Referenced by SgOpp().
Definition at line 36 of file SgBoardColor.h.
Referenced by SgEBW().
typedef int SgBoardColor |
SG_BLACK, SG_WHITE, SG_EMPTY, or SG_BORDER.
Definition at line 34 of file SgBoardColor.h.
typedef int SgEmptyBlackWhite |
SG_BLACK, SG_WHITE, or SG_EMPTY.
Definition at line 31 of file SgBoardColor.h.
BOOST_STATIC_ASSERT | ( | SG_BLACK | = =0 |
) |
BOOST_STATIC_ASSERT | ( | SG_WHITE | = =1 |
) |
BOOST_STATIC_ASSERT | ( | SG_EMPTY | = =2 |
) |
char SgEBW | ( | SgEmptyBlackWhite | color | ) |
Definition at line 53 of file SgBoardColor.h.
References SG_ASSERT_EBW, SG_BLACK, and SG_EMPTY.
bool SgIsEmptyBlackWhite | ( | SgBoardColor | c | ) |
Definition at line 42 of file SgBoardColor.h.
SgBoardColor SgOpp | ( | SgBoardColor | c | ) |
Definition at line 47 of file SgBoardColor.h.
References SG_ASSERT_COLOR, SG_WHITE, and SgOppBW().
const int SG_BORDER = 3 |
Border point (outside of playing area).
Definition at line 19 of file SgBoardColor.h.
const int SG_EMPTY = 2 |
Empty point.
Definition at line 16 of file SgBoardColor.h.
Referenced by SgEBWIterator::operator bool(), SgEBWArray< T >::operator[](), SgEBW(), SgEBWArray< T >::SgEBWArray(), and SgIsEmptyBlackWhite().