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
5#include <concepts>
6#include <functional>
7#include <memory>
9
10template <typename T>
12 T t,
13 // std::shared_ptr<typename T::CalculatorTypeRed> calculator_red,
14 // std::shared_ptr<typename T::CalculatorTypeBlack> calculator_black,
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};
Definitions and implementations of gameboard::Move and other move-related structs.
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 change in the state of a gameboard::GameBoard represented by a gameboard::Move, and each of the gam...