This commit is contained in:
Eric Mertens 2022-11-06 10:11:33 -08:00
parent 6b4c7c7a2f
commit cdfff42f45

View File

@ -32,8 +32,9 @@ auto Interact(Ethernet & ethernet, Machine & m, std::optional<Packet> p) -> void
i.pos = p->first;
StepInput(m, p->second);
Interact(ethernet, m, {});
} else {
i.pos = -1; // no packet
}
i.pos = -1; // no packet
},
[&](Output d) {
auto x = StepOutput(m);
@ -48,7 +49,8 @@ auto Interact(Ethernet & ethernet, Machine & m, std::optional<Packet> p) -> void
} // namespace
auto main() -> int {
auto machines = BuildNetwork(Machine{ParseStream(std::cin)});
std::ifstream fin { "/Users/emertens/Source/advent/inputs/2019/23.txt" };
auto machines = BuildNetwork(Machine{ParseStream(fin)});
auto ethernet = Ethernet{};
std::optional<ValueType> part1;