From 61d16477b01bcfbe8c3a481a232658ac60309f57 Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 27 Apr 2023 00:36:46 +0200 Subject: Extracted KeepAtRange action It seems an abstraction level is of some kind is needed here. One thing to handle "AI", another to handle primitive commands and their execution. --- sim/include/kurator/sim/ai.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sim/include') diff --git a/sim/include/kurator/sim/ai.h b/sim/include/kurator/sim/ai.h index f9899d6..0ffa1cc 100644 --- a/sim/include/kurator/sim/ai.h +++ b/sim/include/kurator/sim/ai.h @@ -1,9 +1,13 @@ #pragma once +#include + #include #include +#include "State.h" + namespace kurator { @@ -11,9 +15,12 @@ namespace sim { +using Action = std::function; + + struct AIShip { - double keep_at_range; + Action action; engine::Point destination; entt::entity target = entt::null; }; -- cgit v1.1