aocpp/lib/include/intcode/Interpreter.hpp
Eric Mertens e98a71dad6 rearrange
2022-11-04 09:38:01 -07:00

27 lines
385 B
C++

#ifndef INTCODE_INTERPRETER_HPP_
#define INTCODE_INTERPRETER_HPP_
#include "Machine.hpp"
namespace intcode {
struct Input {
ValueType &pos;
};
struct Output {
ValueType val;
};
struct Halt {};
auto Step(Machine & m) -> std::variant<Input, Output, Halt>;
struct BadInstruction : public std::runtime_error {
explicit BadInstruction(char const* what);
};
} // namespace
#endif