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 std::bitset<_GO_NU_MOVEFLAG> GoMoveInfo |
| typedef SgSList<SgPoint,SG_MAX_ONBOARD + 1> GoPointList |
| typedef SgSList<SgPoint,GO_MAX_NUM_MOVES> GoSequence |
| enum GoMoveInfoFlag |
Flags for moves.
| 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().