41 const std::map<PieceColor, vector<ExecutedMove>>&
move_log()
const;
55 std::map<PieceColor, vector<ExecutedMove>>
move_log_;
Constants, typedefs, and simple structs used by gameboard::GameBoard.
CRTP interface with methods for obtaining information about gameboard::BoardSpace objects,...
Implements SpaceInfoProvider interface; stores piece positions, and exposes methods for calculating,...
bool ViolatesRepeatRule(PieceColor color)
vector< BoardSpace > ImplementGetAllSpacesOccupiedBy(PieceColor color) const
MoveCalculator move_calculator_
Encapsulates all calculations of allowed moves.
void AddToMoveLog(const ExecutedMove &executed_move)
void ImplementAttachMoveCallback(const function< void(const ExecutedMove &)> &callback)
MoveCollection ImplementCalcFinalMovesOf(PieceColor color)
void UpdateStateTracker(const ExecutedMove &executed_move)
std::map< PieceColor, vector< ExecutedMove > > move_log_
Vectors of all moves that have been executed (and not un-done) by each player.
const std::map< PieceColor, vector< ExecutedMove > > & move_log() const
vector< function< void(const ExecutedMove &)> > move_callbacks_
Stores functions that are called after any change in board config to keep boardstate::SingleZobristCo...
bool IsInCheck(PieceColor color)
PieceType ImplementGetType(const BoardSpace &space) const
void RemoveFromMoveLog(const ExecutedMove &executed_move)
ExecutedMove ImplementExecuteMove(const Move &move)
MoveCountType moves_since_last_capture_
Number of moves executed since last time a piece was captured.
bool IsCaptureMove(const ExecutedMove &executed_move) const
GamePiece GetOccupantAt(const BoardSpace &space) const
BoardMap_t board_map_
2-D array of GamePiece objects.
PieceColor ImplementGetColor(const BoardSpace &space) const
void SetOccupantAt(const BoardSpace &space, GamePiece piece)
const BoardMap_t & map() const
void ImplementUndoMove(const ExecutedMove &executed_move)
Calculates legal gameboard::Move objects for of a gameboard::GameBoard with a particular state.
Definition of gameboard::MoveCalculator.
Definitions of concrete classes that implement the MoveEvaluator interface.
Tracking piece positions and determining legal moves.
const BoardMapInt_t kStandardInitialBoard
Starting board represented as 2-D array of integers.
array< array< int, kNumFiles >, kNumRanks > BoardMapInt_t
2-D array of integers; can be converted to gameboard::BoardMap_t using gameboard::int_board_to_game_p...
array< array< GamePiece, kNumFiles >, kNumRanks > BoardMap_t
2-D array of gameboard::GamePiece objects.
const int kRepeatPeriodsToCheck[3]
Max allowed repetitions of prohibited move sequence lengths.
const int kMaxMovesWithoutCapture
const int kRepeatPeriodsMaxAllowed
Repeated move sequence lengths forbidden under move repetition rules.
A pair of coordinate (rank, and file) with properties determined by comparison with values of gameboa...
A change in the state of a gameboard::GameBoard represented by a gameboard::Move, and each of the gam...
A Xiangqi game piece described by its gameboard::PieceType and its gameboard::PieceColor.
A container for multiple gameboard::Move objects.
A gameboard::BoardSpace pair (start and end).