diff --git a/day23.cpp b/day23.cpp index 833c53f..f1b484e 100644 --- a/day23.cpp +++ b/day23.cpp @@ -32,8 +32,9 @@ auto Interact(Ethernet & ethernet, Machine & m, std::optional 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 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 part1;