MCPcopy Create free account
hub / github.com/AxlLind/AdventOfCode / valid_opcodes

Function valid_opcodes

2018/src/16.py:24–30  ·  view source on GitHub ↗
(before,code,after)

Source from the content-addressed store, hash-verified

22 return regs
23
24def valid_opcodes(before,code,after):
25 _,a,b,c = code
26 valid = set()
27 for op in range(0,16):
28 if run_inst(before[:],op,a,b,c) == after:
29 valid.add(op)
30 return valid
31
32@aoc.main('16')
33def main(indata: str):

Callers 1

mainFunction · 0.85

Calls 1

run_instFunction · 0.85

Tested by

no test coverage detected