Git Product home page Git Product logo

adventofcode's Introduction

Recording 2023-06-15 at 19 41 18

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.

Requirements

You will need to have Golang installed and a terminal in order to run this application.

How to use

  1. Clone the repository into a directory of your preference
git clone https://github.com/CarlosGMI/AdventOfCode
  1. Run go mod tidy
  2. Run go run ./cmd/main.go

Adding challenges

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 the pkg/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 new 2024 folder and inside you will create a 1 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 the pkg/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 the types.go file.
  • Add a new entry in the Challenges map of the constants.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
}

adventofcode's People

Contributors

carlosgmi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.