advent_of_code/2021/15/15.py
kleph 9598e8f526
All checks were successful
continuous-integration/drone/push Build is passing
archive AoC 2021
2022-11-30 02:08:02 +01:00

41 lines
858 B
Python
Executable file

#!/usr/bin/env python
# 2021 - Advent Of Code - 15
# 2022: cheat for pylint to start fresh for 2022
# pylint: skip-file
# unfinished
class Color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
END = '\033[0m'
def parse_file(file):
with open(file, encoding="utf-8") as f:
columns = []
for line in f.readlines():
columns.append([int(c) for c in line.strip()])
return columns
def print_grid(grid):
for y in range(len(grid)):
for x in range(len(grid[y])):
print(grid[y][x], end='')
print()
print()
cave_map = parse_file('input_example.txt')
print_grid(cave_map)
print(color.BOLD + 'Hello World !' + color.END)