Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoBoard.h File Reference


Detailed Description

Go board with basic board and blocks.

GoBoard defines a Go board that implements the rules of Go and provides a lot of helper functions to get blocks, liberties, adjacent blocks, and so on.

Definition in file GoBoard.h.

#include <bitset>
#include <cstring>
#include <stdint.h>
#include <boost/static_assert.hpp>
#include "GoPlayerMove.h"
#include "GoRules.h"
#include "GoSetup.h"
#include "SgArray.h"
#include "SgBoardConst.h"
#include "SgBoardColor.h"
#include "SgMarker.h"
#include "SgBWArray.h"
#include "SgBWSet.h"
#include "SgHash.h"
#include "SgNbIterator.h"
#include "SgPoint.h"
#include "SgPointArray.h"
#include "SgPointIterator.h"
#include "SgPointSet.h"
#include "SgSList.h"

Go to the source code of this file.

Classes

class  GoBoard
 Go board. More...
class  GoBoard::Block
 Data related to a block of stones on the board. More...
class  GoBoard::HashCode
 Board hash code. More...
struct  GoBoard::StackEntry
 Information to undo a move. More...
struct  GoBoard::State
 Data that can be restored quickly with TakeSnapshot/RestoreSnapshot. More...
struct  GoBoard::Snapshot
class  GoBoard::StoneIterator
 Iterate through all the stones of a block. More...
class  GoBoard::Iterator
 Iterate through all points. More...
class  GoBoard::LibertyIterator
 Iterate through all the liberties of a block. More...
class  GoBoard::LibertyCopyIterator
 Iterate through all the liberties of a block. More...

Typedefs

typedef std::bitset< _GO_NU_MOVEFLAG > GoMoveInfo
typedef SgSList< SgPoint,
SG_MAX_ONBOARD+1 > 
GoPointList
 Static list having enough room for all points on board and SG_PASS.
typedef SgSList< SgPoint,
GO_MAX_NUM_MOVES
GoSequence
 Static list having enough room for longest move sequence supported by GoBoard.

Enumerations

enum  GoMoveInfoFlag {
  GO_MOVEFLAG_REPETITION, GO_MOVEFLAG_SUICIDE, GO_MOVEFLAG_CAPTURING, GO_MOVEFLAG_ILLEGAL,
  _GO_NU_MOVEFLAG
}
 Flags for moves. More...

Variables

const int GO_DEFAULT_SIZE = (SG_MAX_SIZE >= 19 ? 19 : SG_MAX_SIZE)
 Board size to choose at startup.
const int GO_MAX_NUM_MOVES = (3 * SG_MAX_SIZE * SG_MAX_SIZE)
 Maximum number of moves in game.


Typedef Documentation

typedef std::bitset<_GO_NU_MOVEFLAG> GoMoveInfo

Definition at line 67 of file GoBoard.h.

typedef SgSList<SgPoint,SG_MAX_ONBOARD + 1> GoPointList

Static list having enough room for all points on board and SG_PASS.

Definition at line 72 of file GoBoard.h.

typedef SgSList<SgPoint,GO_MAX_NUM_MOVES> GoSequence

Static list having enough room for longest move sequence supported by GoBoard.

Definition at line 77 of file GoBoard.h.


Enumeration Type Documentation

enum GoMoveInfoFlag

Flags for moves.

Enumerator:
GO_MOVEFLAG_REPETITION  The move was a repetition move.
GO_MOVEFLAG_SUICIDE  The move caused self-removal of stones.
GO_MOVEFLAG_CAPTURING  The move captured one or more enemy stones.
GO_MOVEFLAG_ILLEGAL  The move was illegal according to the current rules and allow ko settings.
_GO_NU_MOVEFLAG 

Definition at line 48 of file GoBoard.h.


Variable Documentation

const int GO_DEFAULT_SIZE = (SG_MAX_SIZE >= 19 ? 19 : SG_MAX_SIZE)

Board size to choose at startup.

Definition at line 38 of file GoBoard.h.

Referenced by GoGameRecord::InitFromRoot(), and GoBoardUpdater::Update().

const int GO_MAX_NUM_MOVES = (3 * SG_MAX_SIZE * SG_MAX_SIZE)

Maximum number of moves in game.

HEURISTIC: Longest possible game.

Definition at line 43 of file GoBoard.h.

Referenced by GoGtpEngine::CheckMoveStackOverflow(), GoLadder::InitMaxMoveNumber(), and GoBoard::StackOverflowLikely().


17 Jun 2010 Doxygen 1.4.7