diff --git a/day08.py b/day08.py index 8e0d53d..2f1d83a 100644 --- a/day08.py +++ b/day08.py @@ -1,4 +1,5 @@ from tools.aoc import AOCDay +from tools.aoc_ocr import convert_6 from typing import Any @@ -8,7 +9,7 @@ class Day(AOCDay): (2806, "input08") ], [ - ("see image above", "input08") + ("ZBJAB", "input08") ] ] @@ -57,14 +58,11 @@ class Day(AOCDay): while layers[z][y][x] == "2": z += 1 - line += " " if layers[z][y][x] == "0" else "#" + line += "." if layers[z][y][x] == "0" else "#" rows.append(line) - for x in rows: - print(x) - - return "see image above" + return convert_6("\n".join(rows)) if __name__ == '__main__': diff --git a/day11.py b/day11.py index 00279ca..5d1d27b 100644 --- a/day11.py +++ b/day11.py @@ -1,7 +1,7 @@ from intcode import IntCode from tools.aoc import AOCDay from tools.coordinate import Coordinate -from tools.grid import Grid, GridTransformation +from tools.grid import Grid from typing import Any MOVEMENTS = [Coordinate(0, -1), Coordinate(1, 0), Coordinate(0, 1), Coordinate(-1, 0)] @@ -13,7 +13,7 @@ class Day(AOCDay): (2373, "input11") ], [ - ("see image above", "input11") + ("PCKRLPUK", "input11") ] ] @@ -50,9 +50,7 @@ class Day(AOCDay): face += 1 if comp.getOutput() else -1 pos = pos + MOVEMENTS[face % 4] - hull.print(true_char='#', false_char=' ') - - return "see image above" + return hull.get_aoc_ocr_string(x_shift=1) if __name__ == '__main__':