summaryrefslogtreecommitdiffstats
path: root/19/py/intcode.py
diff options
context:
space:
mode:
Diffstat (limited to '19/py/intcode.py')
-rw-r--r--19/py/intcode.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/19/py/intcode.py b/19/py/intcode.py
index 843688c..1c0f062 100644
--- a/19/py/intcode.py
+++ b/19/py/intcode.py
@@ -13,14 +13,17 @@ BAS = 9
HAL = 99
class Computer(object):
- def __init__(self, program, ascii=False):
+ def __init__(self, program, ascii=False, network_id=None):
self.program = program
self.memory_size = len(self.program)
self.instruction_cache = {}
- if ascii:
- self.SIG_ASCII = True
- else:
- self.SIG_ASCII = False
+
+ self.SIG_ASCII = ascii
+
+ self.SIG_NET = False
+ if network_id is not None:
+ self.SIG_NET = True
+ self.network_id = network_id
self.reset()