Nasty day7 naive solution

This commit is contained in:
Daniel Flanagan 2020-12-07 00:44:55 -06:00
parent b861e02a51
commit c04aea181a
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 2 additions and 2 deletions

View file

@ -9,4 +9,4 @@ proc solve_for_day(n: int) {.used.} =
when isMainModule: when isMainModule:
# solve_all() # solve_all()
solve_for_day(6) solve_for_day(7)

View file

@ -3,7 +3,7 @@ import input_requestor, os, macros, strformat, tables
macro loadDays(): untyped = macro loadDays(): untyped =
var solver_str = "var solvers = {\n" var solver_str = "var solvers = {\n"
result = newStmtList() result = newStmtList()
for day in 1..6: for day in 1..25:
let module = fmt"day{day}" let module = fmt"day{day}"
if fileExists joinPath("src/", &"{module}.nim"): if fileExists joinPath("src/", &"{module}.nim"):
result.add parseStmt fmt"from {module} import nil" result.add parseStmt fmt"from {module} import nil"