It looks nice, not what I expected

This commit is contained in:
2024-12-14 09:18:36 +01:00
parent 4a7305d7eb
commit 98983f622c

View File

@@ -1,6 +1,7 @@
import itertools import itertools
import math import math
import re import re
import sys
import numpy import numpy
@@ -69,5 +70,11 @@ class DayRunner(SeparateRunner):
positions %= mod_base positions %= mod_base
if len(numpy.unique(positions, axis=0)) == target: if len(numpy.unique(positions, axis=0)) == target:
# TODO: print the Christmas tree, Eric prepared it for us so nicely grid = [[" "] * width for _ in range(height)]
for x, y in positions:
grid[y][x] = "#"
tree = "\n".join(map((lambda x: "".join(x)), grid))
print(tree, file=sys.stderr)
return i return i