载入中...
搜索中...
未找到
RTSMatch.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7#include "rts/RTSTypes.h"
8
9#include <cstddef>
10#include <functional>
11#include <string_view>
12
13namespace eve::rts {
14
16using MatchResourceQuery = std::function<Result<double>(Faction&, std::string_view)>;
17
20public:
22 [[nodiscard]] static Result<void> addParticipant(Match& match, Faction& faction, int team);
24 [[nodiscard]] static Result<void> start(Match& match);
26 [[nodiscard]] static Result<void> surrender(Match& match, Faction& faction);
28 [[nodiscard]] static Result<std::size_t> step(Match& match, const MatchResourceQuery& resources = {});
29};
30
31} // namespace eve::rts
Duration start
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::vector< std::weak_ptr< DeviceBytes > > resources
Definition OnnxGpgpu.cpp:55
RTS domain roots and composition-only components.
float step
Definition TreeMesh.cpp:314
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Faction domain root; membership is a set of typed runtime handles.
Definition RTSTypes.h:1178
Match command and simulation boundary.
Definition RTSMatch.h:19
Independent match composition root; factions may participate in different matches.
Definition RTSTypes.h:1295
std::function< Result< double >(Faction &, std::string_view)> MatchResourceQuery
Reads a resource balance from the game-owned canonical economy account.
Definition RTSMatch.h:16