Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
single_board_state_provider.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <concepts>
4
#include <memory>
5
#include <type_traits>
6
7
template
<
typename
T>
8
concept
SingleBoardStateProviderConcept
=
requires
(T t, uint32_t seed) {
9
typename
T::KeyType;
10
// KeyType must be unsigned integer with bitsize a multiple of 32
11
requires
std::unsigned_integral<typename T::KeyType>;
12
requires
(
sizeof
(
typename
T::KeyType) * 8) % 32 == 0;
13
14
{ t.board_state() } -> std::same_as<typename T::KeyType>;
15
{ t.Create(seed) } -> std::same_as<std::shared_ptr<T>>;
16
};
SingleBoardStateProviderConcept
Definition:
single_board_state_provider.hpp:8
include
concepts
single_board_state_provider.hpp
Generated on Sun Dec 29 2024 02:10:05 for Xiangiqgame by
1.9.6