adventOfCode/lib/aocpy/vis.py
AKP ae703f98aa
Code formatting
Signed-off-by: AKP <tom@tdpain.net>
2022-12-21 17:12:28 +00:00

11 lines
249 B
Python

import os.path
class SaveManager:
def __init__(self, d):
self.dir = d
self.current_n = 0
def save(self, im):
im.save(os.path.join(self.dir, f"frame_{str(self.current_n).zfill(4)}.png"))
self.current_n += 1