Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Classes | Defines | Typedefs | Functions | Variables

SgBoardColor.h File Reference

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

Detailed Description

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

Definition in file SgBoardColor.h.


Define Documentation

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

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

Definition at line 36 of file SgBoardColor.h.

Referenced by SgEBW().


Typedef Documentation

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.


Function Documentation

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.

References SG_BLACK, SG_EMPTY, and SG_WHITE.

SgBoardColor SgOpp ( SgBoardColor  c  ) 

Definition at line 47 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 19 of file SgBoardColor.h.

const int SG_EMPTY = 2


Sun Mar 13 2011 Doxygen 1.7.1