- Copy
DayTemplate.kt
toDayXX.kt
. - Replace
XX
in theaccDayXX
function name with current day, adjust function call inmain
function. - Update the
day
parameter of theaocTaskWithExample
function call. - Paste inline example to
val example
, in case of multiple examples, uselistOf()
(then change the function call fromaocTaskWithExample
toaocTaskWithExamples
. - Adjust expected output of the first part from text (parameter
expectedOutputPart1
of functionsaocTaskWithExample
andaocTaskWithExamples
); uselistOf()
in case of multiple examples. - Download the puzzle input to file
input/2022_day_XX.txt
. - Solve the first part of the problem statement in the function
private fun part1(input: List<String>)
. - Run the main function and check the output. The examples are tested before using the puzzle input.
- Solve the second part of the problem statement in the function
private fun part2(input: List<String>)
. - Uncomment the reference to the function
part2
in the function callaocTaskWithExample
oraocTaskWithExamples
. - Add new test case in
Acc2022Tests
MIT License
Copyright (c) 2022 Marek Šiller
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.