This is a simple TUI application for listing and executing all the Advent of Code challenges. The application makes use of Bubbletea for all the lists and options in the application.
You will need to have Golang installed and a terminal in order to run this application.
- Clone the repository into a directory of your preference
git clone https://github.com/CarlosGMI/AdventOfCode
- Run
go mod tidy
- Run
go run ./cmd/main.go
If you want to add more Advent of Code challenges from the ones in this repo you need to:
- Create a new
README.md
file inside thepkg/app/instructions
directory making sure you follow the$YEAR/$DAY
subdirectory structure. For example, if you want to add the 2024 Day 1 challenge you will need to create a new2024
folder and inside you will create a1
folder.- If you don't do this, the application won't be able to display the challenge instructions when you're running the app.
- Create a new
.go
file inside thepkg/app/challenges
directory. This will be the file that will contain the code for the challenge.- This file needs to implement the
Challenge
interface in thetypes.go
file.
- This file needs to implement the
- Add a new entry in the
Challenges
map of theconstants.go
file. The key of the new entry should follow the$YEAR-$DAY
naming convention. For example, if you want to add the 2024 Day 1 challenge you can add the entry as:
var Challenges = map[string]Challenge{
"2022-1": challenges.Exec20221{},
"2024-1": challenges.Exec20241{}, // <-- new challenge
}