Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

GoBoard::HashCode Class Reference

Board hash code. More...

List of all members.

Public Member Functions

void Clear ()
const SgHashCodeGet () const
SgHashCode GetInclToPlay (SgBlackWhite toPlay) const
void XorCaptured (int moveNumber, SgPoint firstCapturedStone)
void XorStone (SgPoint p, SgBlackWhite c)
void XorWinKo (int level, SgBlackWhite c)

Private Member Functions

 BOOST_STATIC_ASSERT (START_INDEX_TOPLAY >=0)
 BOOST_STATIC_ASSERT (END_INDEX_TOPLAY > START_INDEX_TOPLAY)
 BOOST_STATIC_ASSERT (START_INDEX_STONES > END_INDEX_TOPLAY)
 BOOST_STATIC_ASSERT (END_INDEX_STONES > START_INDEX_STONES)
 BOOST_STATIC_ASSERT (END_INDEX_WINKO > START_INDEX_WINKO)
 BOOST_STATIC_ASSERT (START_INDEX_CAPTURES > END_INDEX_WINKO)
 BOOST_STATIC_ASSERT (END_INDEX_CAPTURES > START_INDEX_CAPTURES)
 BOOST_STATIC_ASSERT (START_INDEX_WINKO+MAX_KOLEVEL *3-1<=END_INDEX_WINKO)
 BOOST_STATIC_ASSERT (END_INDEX_CAPTURES< SgHashZobristTable::MAX_HASH_INDEX)

Private Attributes

SgHashCode m_hash

Static Private Attributes

static const int START_INDEX_TOPLAY = 1
static const int END_INDEX_TOPLAY = 2
static const int START_INDEX_STONES = 3
static const int END_INDEX_STONES = 2 * SG_MAXPOINT
static const int START_INDEX_WINKO = 2 * SG_MAXPOINT + 1
static const int END_INDEX_WINKO = 2 * SG_MAXPOINT + SG_MAX_SIZE + 1
static const int START_INDEX_CAPTURES = 2 * SG_MAXPOINT + SG_MAX_SIZE + 2
static const int END_INDEX_CAPTURES = 3 * SG_MAXPOINT + 63

Detailed Description

Board hash code.

See also:
Hash Code in Class GoBoard

Definition at line 579 of file GoBoard.h.


Member Function Documentation

GoBoard::HashCode::BOOST_STATIC_ASSERT ( START_INDEX_TOPLAY >=  0  )  [private]
GoBoard::HashCode::BOOST_STATIC_ASSERT (  )  [private]

Referenced by GetInclToPlay(), XorStone(), and XorWinKo().

GoBoard::HashCode::BOOST_STATIC_ASSERT ( END_INDEX_TOPLAY  ,
START_INDEX_TOPLAY   
) [private]
GoBoard::HashCode::BOOST_STATIC_ASSERT ( START_INDEX_STONES  ,
END_INDEX_TOPLAY   
) [private]
GoBoard::HashCode::BOOST_STATIC_ASSERT ( END_INDEX_STONES  ,
START_INDEX_STONES   
) [private]
GoBoard::HashCode::BOOST_STATIC_ASSERT ( END_INDEX_WINKO  ,
START_INDEX_WINKO   
) [private]
GoBoard::HashCode::BOOST_STATIC_ASSERT ( START_INDEX_CAPTURES  ,
END_INDEX_WINKO   
) [private]
GoBoard::HashCode::BOOST_STATIC_ASSERT ( END_INDEX_CAPTURES  ,
START_INDEX_CAPTURES   
) [private]
GoBoard::HashCode::BOOST_STATIC_ASSERT ( START_INDEX_WINKO+MAX_KOLEVEL *3-1<=  END_INDEX_WINKO  )  [private]
void GoBoard::HashCode::Clear (  ) 

Definition at line 1084 of file GoBoard.h.

References SgHash< N >::Clear(), and m_hash.

Referenced by GoBoard::Init().

const SgHashCode & GoBoard::HashCode::Get (  )  const

Definition at line 1089 of file GoBoard.h.

References m_hash.

Referenced by GoBoard::GetHashCode().

SgHashCode GoBoard::HashCode::GetInclToPlay ( SgBlackWhite  toPlay  )  const
void GoBoard::HashCode::XorCaptured ( int  moveNumber,
SgPoint  firstCapturedStone 
)
void GoBoard::HashCode::XorStone ( SgPoint  p,
SgBlackWhite  c 
)
void GoBoard::HashCode::XorWinKo ( int  level,
SgBlackWhite  c 
)

Member Data Documentation

const int GoBoard::HashCode::END_INDEX_CAPTURES = 3 * SG_MAXPOINT + 63 [static, private]

Definition at line 604 of file GoBoard.h.

Referenced by XorCaptured().

const int GoBoard::HashCode::END_INDEX_STONES = 2 * SG_MAXPOINT [static, private]

Definition at line 599 of file GoBoard.h.

Referenced by XorStone().

const int GoBoard::HashCode::END_INDEX_TOPLAY = 2 [static, private]

Definition at line 597 of file GoBoard.h.

Referenced by GetInclToPlay().

const int GoBoard::HashCode::END_INDEX_WINKO = 2 * SG_MAXPOINT + SG_MAX_SIZE + 1 [static, private]

Definition at line 601 of file GoBoard.h.

Referenced by XorWinKo().

Definition at line 620 of file GoBoard.h.

Referenced by Clear(), Get(), GetInclToPlay(), XorCaptured(), XorStone(), and XorWinKo().

const int GoBoard::HashCode::START_INDEX_CAPTURES = 2 * SG_MAXPOINT + SG_MAX_SIZE + 2 [static, private]

Definition at line 603 of file GoBoard.h.

Referenced by XorCaptured().

const int GoBoard::HashCode::START_INDEX_STONES = 3 [static, private]

Definition at line 598 of file GoBoard.h.

Referenced by XorStone().

const int GoBoard::HashCode::START_INDEX_TOPLAY = 1 [static, private]

Definition at line 596 of file GoBoard.h.

Referenced by GetInclToPlay().

const int GoBoard::HashCode::START_INDEX_WINKO = 2 * SG_MAXPOINT + 1 [static, private]

Definition at line 600 of file GoBoard.h.

Referenced by XorWinKo().


The documentation for this class was generated from the following file:


Sun Mar 13 2011 Doxygen 1.7.1