Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgBoardColor.h File Reference


Detailed Description

State of a point on the board for games with Black, White, Empty states.

Definition in file SgBoardColor.h.

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


Define Documentation

#define SG_ASSERT_COLOR (  )     SG_ASSERT(c == SG_BLACK || c == SG_WHITE || c == SG_EMPTY || c == SG_BORDER)

Definition at line 40 of file SgBoardColor.h.

Referenced by SgOpp().

#define SG_ASSERT_EBW (  )     SG_ASSERT(c == SG_BLACK || c == SG_WHITE || c == SG_EMPTY)

Definition at line 37 of file SgBoardColor.h.

Referenced by SgEBWArray< T >::operator[](), and SgEBW().


Typedef Documentation

typedef int SgBoardColor

SG_BLACK, SG_WHITE, SG_EMPTY, or SG_BORDER.

Definition at line 35 of file SgBoardColor.h.

typedef int SgEmptyBlackWhite

SG_BLACK, SG_WHITE, or SG_EMPTY.

Definition at line 32 of file SgBoardColor.h.


Function Documentation

BOOST_STATIC_ASSERT ( SG_EMPTY  = =2  ) 

BOOST_STATIC_ASSERT ( SG_WHITE  = =1  ) 

BOOST_STATIC_ASSERT ( SG_BLACK  = =0  ) 

char SgEBW ( SgEmptyBlackWhite  color  ) 

Definition at line 54 of file SgBoardColor.h.

References SG_ASSERT_EBW, SG_BLACK, and SG_EMPTY.

bool SgIsEmptyBlackWhite ( SgBoardColor  c  ) 

Definition at line 43 of file SgBoardColor.h.

References SG_BLACK, SG_EMPTY, and SG_WHITE.

SgBoardColor SgOpp ( SgBoardColor  c  ) 

Definition at line 48 of file SgBoardColor.h.

References SG_ASSERT_COLOR, SG_WHITE, and SgOppBW().


Variable Documentation

const int SG_BORDER = 3

Border point (outside of playing area).

Definition at line 20 of file SgBoardColor.h.

const int SG_EMPTY = 2

Empty point.

Definition at line 17 of file SgBoardColor.h.

Referenced by SgEBWIterator::operator bool(), SgEBW(), SgEBWArray< T >::SgEBWArray(), and SgIsEmptyBlackWhite().


17 Jun 2010 Doxygen 1.4.7