20 constexpr std::uint8_t OffBoardSquare = 41;
48 std::wstring_view
lhs,
49 std::wstring_view
rhs)
51 if (
lhs.size() !=
rhs.size())
56 for (std::size_t
i = 0;
61 std::towlower(
lhs[
i]) !=
62 std::towlower(
rhs[
i]))
80 static_cast<std::int64_t
>(
128 if (square.
owner != player)
149 static_cast<std::int64_t
>(
197 static_cast<std::uint64_t
>(
253 const std::int64_t
wealth =
357 static_cast<std::uint64_t
>(
565 std::int64_t aiLevel =
580 static_cast<std::uint8_t
>(
703 .timeOfLastActivity =
704 static_cast<std::uint32_t
>(
710 .inactivityCount = 0;
775 static_cast<std::uint64_t
>(
788 static_cast<std::uint32_t
>(
837 static_cast<std::uint32_t
>(
constexpr std::int64_t ErrorGameWonNormal
constexpr std::int64_t ErrorPlayerInactiveWarning
constexpr std::int64_t ErrorGameWonShort
constexpr std::int64_t ErrorGameWonTime
constexpr std::int64_t GamePaused
constexpr std::int64_t ErrorPlayerDisconnected
constexpr std::int64_t GameUnpaused
bool sendAction(const actions::Message &message)
void setPlayerOwner(rules::PlayerNumber player, std::uint32_t source)
const SquareDefinition & definition(SquareType square)
void declareWinner(GameState &state)
bool shouldEndGame(const GameState &state)
bool onlyOneSurvivor(const GameState &state)
bool restartLifecyclePhase(GameState &state)
void onIdleTick(GameState &state)
void actionPauseGame(GameState &state, const actions::Message &message)
void recordPlayerActivity(GameState &state, PlayerNumber player)
void actionDisconnectedPlayer(GameState &state, const actions::Message &message)
bool pop(GameState &state)
const PendingPhase & current(const GameState &state)
bool push(GameState &state, GamePhase phase, PlayerNumber fromPlayer, PlayerNumber toPlayer, std::int64_t amount)
void wrongPlayer(const GameState &state, const actions::Message &message)
void wrongPhase(const GameState &state, const actions::Message &message)
@ CollectAIParametersForSave
constexpr PlayerNumber BankPlayer
std::uint8_t PlayerNumber
constexpr std::size_t MaxPlayerNameLength
constexpr std::size_t SquareCount
const GameState & state()
constexpr PlayerNumber MaxPlayers
constexpr PlayerNumber NobodyPlayer
constexpr PlayerNumber AllPlayers
rules::PlayerNumber fromPlayer
int inactivityWarningTime
PlayerNumber currentPlayer
PlayerNumber numberOfPlayers
std::array< SquareState, SquareCount > squares
std::uint64_t gameDurationInSeconds
std::uint8_t numberOfPendingPhases
std::array< PlayerState, MaxPlayers > players
std::uint8_t inactivityCount
std::uint32_t timeOfLastActivity