Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
StatsCalculatorLogic.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "RuleTypes.hpp"
4
5#include <cstdint>
6#include <expected>
7#include <string>
8
9namespace monopoly::statsui
10{
11 enum class CalculatorFunction : std::uint8_t
12 {
13 Odds = 0,
21 };
22
23 enum class CalculatorResultKind : std::uint8_t
24 {
25 Money = 0,
27 };
34
40
41 [[nodiscard]] std::expected<CalculatorResult, std::string> calculate(
44 const CalculatorSelection& selection) noexcept;
45}
unsigned state
unsigned index
std::uint8_t PlayerNumber
Definition RuleTypes.hpp:12
constexpr PlayerNumber NobodyPlayer
Definition RuleTypes.hpp:16
std::expected< CalculatorResult, std::string > calculate(CalculatorFunction function, const rules::GameState &state, const CalculatorSelection &selection) noexcept