utilize aoc_ocr

This commit is contained in:
Stefan Harmuth 2022-12-10 10:30:12 +01:00
parent eeafe2a56e
commit b6e10c9708
2 changed files with 4 additions and 5 deletions

View File

@ -15,7 +15,7 @@ class Day(AOCDay):
def part1(self): def part1(self):
count = 0 count = 0
depths = self.getInputListAsType(int) depths = self.getInput(int)
for x in range(1, len(depths)): for x in range(1, len(depths)):
if depths[x] > depths[x-1]: if depths[x] > depths[x-1]:
count += 1 count += 1
@ -24,7 +24,7 @@ class Day(AOCDay):
def part2(self): def part2(self):
count = 0 count = 0
depths = self.getInputListAsType(int) depths = self.getInput(int)
for x in range(3, len(depths)): for x in range(3, len(depths)):
if depths[x] > depths[x-3]: if depths[x] > depths[x-3]:

View File

@ -37,7 +37,7 @@ class Day(AOCDay):
(701, "input13") (701, "input13")
], ],
[ [
("see image above", "input13") ("FPEKBEJL", "input13")
] ]
] ]
@ -59,8 +59,7 @@ class Day(AOCDay):
direction, axis = thisFold.split()[-1].split("=") direction, axis = thisFold.split()[-1].split("=")
fold(grid, direction, int(axis)) fold(grid, direction, int(axis))
grid.print(true_char='#') return grid.get_aoc_ocr_string()
return "see image above"
if __name__ == '__main__': if __name__ == '__main__':