#pragma once #include #include using json = nlohmann::json; namespace warfactory { /** * @brief Pure game logic interface - Claude Code works ONLY on this * * Each module = 200-500 lines of pure game logic * No infrastructure code, no threading, no networking * Just: receive JSON input -> process logic -> return JSON output */ class IModule { public: virtual ~IModule() = default; /** * @brief Initialize module with configuration * @param config JSON configuration for this module */ virtual void initialize(const json& config) = 0; /** * @brief Process game logic - PURE FUNCTION * @param input JSON input from other modules or engine * @return JSON output to send to other modules */ virtual json process(const json& input) = 0; /** * @brief Get module metadata * @return Module name, version, dependencies */ virtual json getMetadata() const = 0; /** * @brief Cleanup resources */ virtual void shutdown() = 0; /** * @brief Module name for identification */ virtual std::string getName() const = 0; }; } // namespace warfactory