diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-15 17:30:25 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-15 17:30:25 +0100 |
| commit | 6eaf0e604b707a9d117b2858a5d2e54720f0193a (patch) | |
| tree | c93eae97e19fccbcd4e541f5b0208ae5aad09e7f | |
| parent | 18ee463da09b4f7fd0f5d5bf04690fdb9027bcfb (diff) | |
| download | aoc-6eaf0e604b707a9d117b2858a5d2e54720f0193a.tar.gz | |
Minor refactor
| -rw-r--r-- | solutions/py/intcode.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/solutions/py/intcode.py b/solutions/py/intcode.py index e9ef90c..d267d63 100644 --- a/solutions/py/intcode.py +++ b/solutions/py/intcode.py @@ -93,11 +93,10 @@ class Computer(object): self.SIG_INPUT = False self.pointer += 2 elif inst[0] == OUT: - if self.output is not None: - self.SIG_OUTPUT = True + if self.SIG_OUTPUT: return self.output = self.get_param(inst, 1) - self.SIG_OUTPUT = False + self.SIG_OUTPUT = True self.pointer += 2 elif inst[0] == JNZ: if self.get_param(inst, 1) != 0: |
