diff --git a/2019/aoc2019/day23.py b/2019/aoc2019/day23.py index 989a165..e1c6aff 100644 --- a/2019/aoc2019/day23.py +++ b/2019/aoc2019/day23.py @@ -46,7 +46,7 @@ def part2(data: TextIO) -> int: for computer in computers: try: - computer._execute_current() + computer.execute_current() is_idle = False except IndexError: computer.send_input(-1) diff --git a/2019/aoc2019/intcode.py b/2019/aoc2019/intcode.py index 6b060a1..86777a3 100644 --- a/2019/aoc2019/intcode.py +++ b/2019/aoc2019/intcode.py @@ -70,7 +70,7 @@ class Computer: def run(self) -> None: """ Run until failure """ - while self._execute_current(): + while self.execute_current(): pass def get_output(self) -> int: @@ -79,7 +79,7 @@ class Computer: def send_input(self, data: int): self.input.append(data) - def _execute_current(self) -> bool: + def execute_current(self) -> bool: """ Execute a single instruction :return: True if the program should continue