/advent-of-code

Primary LanguageKotlinApache License 2.0Apache-2.0

advent-of-code

Welcome to the Advent of Code1 Kotlin project created by michalchomo using the Advent of Code Kotlin Template delivered by JetBrains.

In this repository, Michal Chomo is about to provide solutions for the puzzles using Kotlin language.

Modifications to the Advent of Code Kotlin Template

The directory structure is modified so that one repository can be used for multiple years. Each year has its own package with prefix year, so year2022, year2023, etc.

Also, there is a gradle task addDay that generates files for a specified day, e.g.:

./gradlew addDay -n 17

generates files

  • Day17.kt - copy of the template DayTemplate.kt.template with adjusted package and the names of the text files.
  • Day17.txt - empty file, meant for the input of the day.
  • Day17_test.txt - empty file, meant for the test input of the day.
  • Day17_answers.txt - empty file, meant for the correct puzzle answers of the day. Used in tests.

Footnotes

  1. Advent of Code – An annual event of Christmas-oriented programming challenges started December 2015. Every year since then, beginning on the first day of December, a programming puzzle is published every day for twenty-five days. You can solve the puzzle and provide an answer using the language of your choice.