AoC 2022 Day 5 (part 1) animation
This is an animated solution to the part 1 of Day 5 of the 2022 Advent Of Code challenges, was asked to share the code so here it is.
First time trying to draw something in the terminal, so it's a bit messy, but it works.
The problem can be found here: https://adventofcode.com/2022/day/5
The input file is named input.txt
and is in the same folder as the script (must obviously be in the same format as the given challenge input).
You can tweak the delay
variable to change the speed of the animation. Too fast and it can start blinking.
Done with f-Strings only and ANSI escape sequences as I didn't know about the curses library before haha, will definitely try using that next time.
I'm trying to get better at Python, so please feel free to suggest anything that I could have done better (100% sure there are a ton of them) ,or if you have a question.
Using
python solve_pretty.py