diff options
author | Aki <please@ignore.pl> | 2022-11-11 16:32:05 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-11-11 16:32:05 +0100 |
commit | 07049889c4b1afc2306ee609dc3b0ff69a92e3f4 (patch) | |
tree | d3bc41408285354c3b84264188ef7e5040aa7fd0 /battles/include | |
parent | 4619a1d86dc21c42439b2c2efd6654b565d46441 (diff) | |
download | kurator-07049889c4b1afc2306ee609dc3b0ff69a92e3f4.zip kurator-07049889c4b1afc2306ee609dc3b0ff69a92e3f4.tar.gz kurator-07049889c4b1afc2306ee609dc3b0ff69a92e3f4.tar.bz2 |
Hiding away implementation details of battle simulation
Diffstat (limited to 'battles/include')
-rw-r--r-- | battles/include/kurator/battles/Battle.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/battles/include/kurator/battles/Battle.h b/battles/include/kurator/battles/Battle.h index 468a972..82a5da5 100644 --- a/battles/include/kurator/battles/Battle.h +++ b/battles/include/kurator/battles/Battle.h @@ -1,5 +1,7 @@ #pragma once +#include <memory> + #include <entt/entity/registry.hpp> #include "Scenario.h" @@ -11,13 +13,17 @@ namespace battles { -struct Battle +class Battle { - explicit Battle(Scenario scenario); - void update(float dt); - entt::registry registry; +public: + virtual ~Battle() = default; + virtual entt::registry& registry() = 0; + virtual void update(float dt) = 0; }; +auto prepare(const Scenario& scenario) -> std::unique_ptr<Battle>; + + } // namespace battles } // namespace kurator |