diff --git a/2023/day10/part1.py b/2023/day10/part1.py new file mode 100644 index 0000000..0857c10 --- /dev/null +++ b/2023/day10/part1.py @@ -0,0 +1,32 @@ +import sys +from pprint import pprint + +#colors +from termcolor import colored + +grid = [] + +log = True + +def p(x): + global log + if log: + for i in x: + for j in i: + if j == 'S': + print(colored(j,'red'),end='') + else: + print(j,end='') + print() + + + + +with open(sys.argv[1]) as file: + for line in file: + grid.append(line.rstrip()) + +for ldx,line in enumerate(grid): + grid[ldx] = line.translate(str.maketrans("-|F7LJ.", "─│┌┐└┘ ")) + +p(grid) diff --git a/2023/day10/t1 b/2023/day10/t1 new file mode 100644 index 0000000..7650925 --- /dev/null +++ b/2023/day10/t1 @@ -0,0 +1,5 @@ +..... +.S-7. +.|.|. +.L-J. +..... diff --git a/2023/day10/t2 b/2023/day10/t2 new file mode 100644 index 0000000..682499d --- /dev/null +++ b/2023/day10/t2 @@ -0,0 +1,5 @@ +..F7. +.FJ|. +SJ.L7 +|F--J +LJ...