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

GoBoard.h File Reference

Go board with basic board and blocks. More...

#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 "SgArrayList.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"

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 SgArrayList< SgPoint,
SG_MAX_ONBOARD+1 > 
GoPointList
 Static list having enough room for all points on board and SG_PASS.
typedef SgArrayList< 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.

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.


Typedef Documentation

typedef std::bitset<_GO_NU_MOVEFLAG> GoMoveInfo

Definition at line 64 of file GoBoard.h.

typedef SgArrayList<SgPoint,SG_MAX_ONBOARD + 1> GoPointList

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

Definition at line 69 of file GoBoard.h.

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

Definition at line 73 of file GoBoard.h.


Enumeration Type Documentation

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 46 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 37 of file GoBoard.h.

Referenced by GoGame::Init(), 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 41 of file GoBoard.h.

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


Sun Mar 13 2011 Doxygen 1.7.1