summaryrefslogtreecommitdiff
path: root/sim/include
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-02-14 00:13:02 +0100
committerAki <please@ignore.pl>2023-02-14 00:28:48 +0100
commit632c367ae6885657e6c99b96b8bf7a96b61a2bb9 (patch)
tree3b6210086d2c082533288d06f2843b9150e747dd /sim/include
parent2a9f378c66b28cef1c5ee063cf4d7e4e2889076e (diff)
downloadkurator-632c367ae6885657e6c99b96b8bf7a96b61a2bb9.zip
kurator-632c367ae6885657e6c99b96b8bf7a96b61a2bb9.tar.gz
kurator-632c367ae6885657e6c99b96b8bf7a96b61a2bb9.tar.bz2
Extracted basic simulation behaviour and that part of state to own class
Diffstat (limited to 'sim/include')
-rw-r--r--sim/include/kurator/sim.h4
-rw-r--r--sim/include/kurator/sim/System.h (renamed from sim/include/kurator/sim/systems.h)5
2 files changed, 6 insertions, 3 deletions
diff --git a/sim/include/kurator/sim.h b/sim/include/kurator/sim.h
index 3c4364c..3330c48 100644
--- a/sim/include/kurator/sim.h
+++ b/sim/include/kurator/sim.h
@@ -3,6 +3,7 @@
#include <kurator/campaign/Scenario.h>
#include "sim/State.h"
+#include "sim/System.h"
namespace kurator
@@ -11,7 +12,8 @@ namespace sim
{
-void load_scenario(State& ctx, const campaign::Scenario& scenario);
+auto load_scenario(const campaign::Scenario& scenario) -> State;
+auto base_simulation_systems(State& ctx) -> System;
} // namespace sim
diff --git a/sim/include/kurator/sim/systems.h b/sim/include/kurator/sim/System.h
index 76353c2..101812a 100644
--- a/sim/include/kurator/sim/systems.h
+++ b/sim/include/kurator/sim/System.h
@@ -1,5 +1,7 @@
#pragma once
+#include <functional>
+
#include <kurator/engine/Context.h>
@@ -9,8 +11,7 @@ namespace sim
{
-void keep_at_range(engine::Context& ctx);
-void kill_off_dead(engine::Context& ctx);
+using System = std::function<void(engine::Context&)>;
} // namespace sim