Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
SpaceInfoProviderConcept Concept Reference

#include <space_info_provider.hpp>

Concept definition

template<typename T>
concept SpaceInfoProviderConcept = requires(
T t,
gameboard::ExecutedMove &executed_move,
const gameboard::BoardMapInt_t &starting_board
) {
{
t.GetAllSpacesOccupiedBy(color)
} -> std::same_as<std::vector<gameboard::BoardSpace>>;
{t.GetColor(space)} -> std::same_as<gameboard::PieceColor>;
{t.GetType(space)} -> std::same_as<gameboard::PieceType>;
{t.CalcFinalMovesOf(color)} -> std::same_as<gameboard::MoveCollection>;
{t.ExecuteMove(move)} -> std::same_as<gameboard::ExecutedMove>;
{t.UndoMove(executed_move)} -> std::same_as<void>;
{t.IsDraw()} -> std::same_as<bool>;
{t.map()} -> std::same_as<const gameboard::BoardMap_t&>;
{t.Create(starting_board)} -> std::same_as<std::shared_ptr<T>>;
}
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...
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 gameboard::BoardSpace pair (start and end).

Detailed Description

Definition at line 10 of file space_info_provider.hpp.