Renamed solver to main

master
Tibor Bizjak 2023-03-14 00:13:50 +01:00
parent 3fa9ecd01a
commit a79651b1de
7 changed files with 12 additions and 16 deletions

View File

@ -18,7 +18,7 @@ def partI(modules):
def partII(modules):
return sum(map(calc_fuel, modules))
import solver
tests = solver.Tests()
from main import Tests
tests = Tests()
tests.add(1969, partI=654, partII=966)
tests.add(100756, partI=33583, partII=50346)

View File

@ -44,5 +44,3 @@ def partII(init_prog):
break
return 100*noun + verb
import solver

View File

@ -67,9 +67,9 @@ def partII(paths):
return min_steps(path1, path2)
import solver
from main import Tests
tests = solver.Tests()
tests = Tests()
tests.add("R75,D30,R83,U83,L12,D49,R71,U7,L72\n" +
"U62,R66,U55,R34,D71,R55,D58,R83",
partI=159,

View File

@ -15,9 +15,8 @@ def partI(graph):
def partII(graph):
return graph.min_path("SAN", "YOU") - 2
import solver
tests = solver.Tests()
from main import Tests
tests = Tests()
tests.add("""COM)B
B)C
C)D

View File

@ -46,9 +46,8 @@ def partII(amp):
return best
import solver
tests = solver.Tests()
from main import Tests
tests = Tests()
tests.add(
"3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0", partI=43210)

View File

@ -11,7 +11,7 @@ def partI(program):
def partII(program):
return Interpreter(program, SingletonIO).run(2)
import solver
tests = solver.Tests()
from main import Tests
tests = Tests()
tests.add("104,1125899906842624,99", partI=1125899906842624)

View File

@ -96,9 +96,9 @@ def partII(packed):
v = asteroid_map.vaporize_seq(asteroid)[199]
return 100*v.x + v.y
import solver
from main import Tests
tests = solver.Tests()
tests = Tests()
map1 = \
""".#..#