sdl_runtime_compiler git · main
SDL3 game for running and compiling code at runtime
C++ 72.3% C 26.2%git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gzsrc/levels/goal.hpp raw
#pragma once
#include <string>
#include <variant>
#include "entities/pult.hpp"
#include "utils/globals.hpp"
namespace
Nimbin
{
namespace Goal
{
struct ReachPlate { std::string tag; };
struct PressButton { PultAction action; };
struct CollectWord { std::string text; };
struct DroppedWord {};
struct ShotWord {};
struct CompilePattern{ std::string pattern; };
struct AiWordDefeated{ std::string text; };
struct AnyOf;
struct AllOf;
using Type = std::variant<
ReachPlate,
PressButton,
CollectWord,
DroppedWord,
ShotWord,
AiWordDefeated,
CompilePattern,
AnyOf,
AllOf
>;
struct AnyOf { DynArray<Type> options; };
struct AllOf { DynArray<Type> options; };
struct Context {
DynArray<std::string> active_plate_tags;
DynArray<PultAction> buttons_pressed_this_step;
DynArray<std::string> picked_up_this_step;
DynArray<std::string> ai_words_defeated_this_step;
bool dropped_this_step {false};
bool shot_this_step {false};
bool compile_ok_this_step {false};
std::string editor_normalized;
};
bool is_Satisfied(const Type& g, const Context& ctx);
} // namespace Goal
} // namespace Nimbin