day 8 with all sub-pics

This commit is contained in:
2025-02-23 10:16:50 +01:00
parent b7e8ed8cfb
commit 3d2be9209f
163 changed files with 6 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ f_columns = 50
from time import time
from copy import deepcopy
import numpy as np
from PIL import Image, ImageDraw, ImageFont
from PIL import Image
start_time = time()
@@ -97,8 +97,13 @@ def array_to_image(ar):
if __name__ == "__main__":
field = create_field(int(f_columns), int(f_rows))
commands = read_file(file)
counter=0
for command in commands:
field = do_command(command, field)
img = array_to_image(field)
img.save(f"./all_pics/pic{counter:03d}.png")
counter+=1
print(f"Solution Part1: {count_pixel(field)}")
print(f"Solution Part2:")