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
7template <typename T>
8concept 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};