Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
board_state_calculator_registry.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
concepts/board_state_calculator.hpp
>
4
#include <
concepts/space_info_provider.hpp
>
5
#include <concepts>
6
#include <functional>
7
#include <memory>
8
#include <
gameboard/move_data_structs.hpp
>
9
10
template
<
typename
T>
11
concept
BoardStateCalculatorRegistryConcept
=
requires
(
12
T t,
13
// std::shared_ptr<typename T::CalculatorTypeRed> calculator_red,
14
// std::shared_ptr<typename T::CalculatorTypeBlack> calculator_black,
15
gameboard::PieceColor
color,
16
const
gameboard::BoardMapInt_t
&starting_board,
17
const
function<void(
const
gameboard::ExecutedMove
&)> &callback
18
19
) {
20
// { t.AttachCalculator(calculator_red, color) } -> std::same_as<void>;
21
// { t.AttachCalculator(calculator_black, color)} -> std::same_as<void>;
22
{ t.AttachMoveCallback(callback) } -> std::same_as<void>;
23
{ t.Create(starting_board) } -> std::same_as<std::shared_ptr<T>>;
24
};
board_state_calculator.hpp
BoardStateCalculatorRegistryConcept
Definition:
board_state_calculator_registry.hpp:11
move_data_structs.hpp
Definitions and implementations of gameboard::Move and other move-related structs.
gameboard::BoardMapInt_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...
Definition:
board_data_structs.hpp:47
gameboard::PieceColor
PieceColor
Definition:
game_piece.hpp:38
space_info_provider.hpp
gameboard::ExecutedMove
A change in the state of a gameboard::GameBoard represented by a gameboard::Move, and each of the gam...
Definition:
move_data_structs.hpp:93
include
concepts
board_state_calculator_registry.hpp
Generated on Sun Dec 29 2024 02:10:05 for Xiangiqgame by
1.9.6