Skip to content

Commit

Permalink
Added day 08
Browse files Browse the repository at this point in the history
  • Loading branch information
ACSimon33 committed Dec 8, 2023
1 parent 17c92c6 commit a2687fb
Show file tree
Hide file tree
Showing 10 changed files with 1,050 additions and 0 deletions.
65 changes: 65 additions & 0 deletions 2023/08/haunted_wasteland/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import kotlinx.benchmark.gradle.JvmBenchmarkTarget

plugins {
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.kotlinx.benchmark")
id("com.ncorti.ktfmt.gradle")
application
}

repositories {
mavenCentral()
}

dependencies {
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.9.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
implementation("com.github.ajalt.clikt:clikt:4.2.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

application {
// Define the main class for the application.
mainClass.set("aoc2023.day08.AppKt")
}

tasks.named<Test>("test") {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}

sourceSets.create("benchmarks")

kotlin.sourceSets.getByName("benchmarks") {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.4")

implementation(sourceSets.main.get().output)
implementation(sourceSets.main.get().runtimeClasspath)
}
}

benchmark {
configurations {
named("main") {
// configure default configuration
}
}
targets {
register("benchmarks") {
this as JvmBenchmarkTarget
jmhVersion = "1.21"
}
}
}

ktfmt {
kotlinLangStyle()
}
9 changes: 9 additions & 0 deletions 2023/08/haunted_wasteland/input/example_input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
RL

AAA = (BBB, CCC)
BBB = (DDD, EEE)
CCC = (ZZZ, GGG)
DDD = (DDD, DDD)
EEE = (EEE, EEE)
GGG = (GGG, GGG)
ZZZ = (ZZZ, ZZZ)
5 changes: 5 additions & 0 deletions 2023/08/haunted_wasteland/input/example_input_2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LLR

AAA = (BBB, BBB)
BBB = (AAA, ZZZ)
ZZZ = (ZZZ, ZZZ)
10 changes: 10 additions & 0 deletions 2023/08/haunted_wasteland/input/example_input_3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
LR

11A = (11B, XXX)
11B = (XXX, 11Z)
11Z = (11B, XXX)
22A = (22B, XXX)
22B = (22C, 22C)
22C = (22Z, 22Z)
22Z = (22B, 22B)
XXX = (XXX, XXX)
Loading

0 comments on commit a2687fb

Please sign in to comment.