Implements SpaceInfoProvider interface; stores piece positions, and exposes methods for calculating, executing, an un-doing moves.
More...
#include <game_board.hpp>
Implements SpaceInfoProvider interface; stores piece positions, and exposes methods for calculating, executing, an un-doing moves.
Definition at line 25 of file game_board.hpp.
◆ GameBoard() [1/2]
gameboard::GameBoard::GameBoard |
( |
| ) |
|
◆ GameBoard() [2/2]
gameboard::GameBoard::GameBoard |
( |
const BoardMapInt_t |
starting_board | ) |
|
Initializes a gameboard::GameBoard from array of pieces represented as integers.
- Parameters
-
starting_board | An array of integers representing pieces on the board. |
Definition at line 44 of file gameboard.cpp.
◆ AddToMoveLog()
void gameboard::GameBoard::AddToMoveLog |
( |
const ExecutedMove & |
executed_move | ) |
|
|
private |
◆ GetOccupantAt()
◆ ImplementAttachMoveCallback()
void gameboard::GameBoard::ImplementAttachMoveCallback |
( |
const function< void(const ExecutedMove &)> & |
callback | ) |
|
◆ ImplementCalcFinalMovesOf()
◆ ImplementExecuteMove()
◆ ImplementGetAllSpacesOccupiedBy()
vector< BoardSpace > gameboard::GameBoard::ImplementGetAllSpacesOccupiedBy |
( |
PieceColor |
color | ) |
const |
◆ ImplementGetColor()
◆ ImplementGetType()
◆ ImplementIsDraw()
bool gameboard::GameBoard::ImplementIsDraw |
( |
| ) |
|
◆ ImplementUndoMove()
void gameboard::GameBoard::ImplementUndoMove |
( |
const ExecutedMove & |
executed_move | ) |
|
◆ IsCaptureMove()
bool gameboard::GameBoard::IsCaptureMove |
( |
const ExecutedMove & |
executed_move | ) |
const |
◆ IsInCheck()
bool gameboard::GameBoard::IsInCheck |
( |
PieceColor |
color | ) |
|
◆ map()
const BoardMap_t & gameboard::GameBoard::map |
( |
| ) |
const |
◆ move_log()
◆ RemoveFromMoveLog()
void gameboard::GameBoard::RemoveFromMoveLog |
( |
const ExecutedMove & |
executed_move | ) |
|
|
private |
◆ SetOccupantAt()
◆ UpdateStateTracker()
void gameboard::GameBoard::UpdateStateTracker |
( |
const ExecutedMove & |
executed_move | ) |
|
|
private |
◆ ViolatesRepeatRule()
bool gameboard::GameBoard::ViolatesRepeatRule |
( |
PieceColor |
color | ) |
|
|
private |
◆ board_map_
◆ move_calculator_
Encapsulates all calculations of allowed moves.
Definition at line 48 of file game_board.hpp.
◆ move_callbacks_
vector<function<void(const ExecutedMove&)> > gameboard::GameBoard::move_callbacks_ |
|
private |
Stores functions that are called after any change in board config to keep boardstate::SingleZobristCoordinator objects updated.
Definition at line 52 of file game_board.hpp.
◆ move_log_
Vectors of all moves that have been executed (and not un-done) by each player.
Definition at line 55 of file game_board.hpp.
◆ moves_since_last_capture_
Number of moves executed since last time a piece was captured.
Definition at line 58 of file game_board.hpp.
The documentation for this class was generated from the following files: