From 50e2671e71e098254322efb46930a2f5700be8a7 Mon Sep 17 00:00:00 2001 From: Kapil Gain <69730236+kapilgain@users.noreply.github.com> Date: Tue, 19 Dec 2023 11:15:55 +0530 Subject: [PATCH] Add Day 19 --- .idea/runConfigurations/Jacoco.xml | 4 +- .idea/runConfigurations/Run_tests.xml | 3 + src/main/java/org/advent/Main.java | 4 +- .../org/advent/{utils => day17}/Crucible.java | 4 +- .../java/org/advent/day17/Day17Part1.java | 1 - .../java/org/advent/day17/Day17Part2.java | 1 - src/main/java/org/advent/day19/Day19.java | 14 ++ .../java/org/advent/day19/Day19Part1.java | 81 ++++++++++ .../java/org/advent/day19/Day19Part2.java | 83 ++++++++++ src/main/java/org/advent/day19/Part.java | 18 +++ src/main/java/org/advent/day19/Workflow.java | 19 +++ .../java/org/advent/day19/WorkflowRule.java | 22 +++ src/main/java/org/advent/utils/MathUtils.java | 11 ++ src/main/java/org/advent/utils/Pointer.java | 6 +- .../advent/{utils => day17}/CrucibleTest.java | 6 +- .../java/org/advent/day18/Day18Part2Test.java | 3 + .../java/org/advent/day19/Day19Part1Test.java | 146 ++++++++++++++++++ .../java/org/advent/day19/Day19Part2Test.java | 41 +++++ src/test/java/org/advent/day19/PartTest.java | 29 ++++ .../org/advent/day19/WorkflowRuleTest.java | 45 ++++++ .../java/org/advent/day19/WorkflowTest.java | 20 +++ .../java/org/advent/utils/MathUtilsTest.java | 8 + 22 files changed, 559 insertions(+), 10 deletions(-) rename src/main/java/org/advent/{utils => day17}/Crucible.java (91%) create mode 100644 src/main/java/org/advent/day19/Day19.java create mode 100644 src/main/java/org/advent/day19/Day19Part1.java create mode 100644 src/main/java/org/advent/day19/Day19Part2.java create mode 100644 src/main/java/org/advent/day19/Part.java create mode 100644 src/main/java/org/advent/day19/Workflow.java create mode 100644 src/main/java/org/advent/day19/WorkflowRule.java rename src/test/java/org/advent/{utils => day17}/CrucibleTest.java (89%) create mode 100644 src/test/java/org/advent/day19/Day19Part1Test.java create mode 100644 src/test/java/org/advent/day19/Day19Part2Test.java create mode 100644 src/test/java/org/advent/day19/PartTest.java create mode 100644 src/test/java/org/advent/day19/WorkflowRuleTest.java create mode 100644 src/test/java/org/advent/day19/WorkflowTest.java diff --git a/.idea/runConfigurations/Jacoco.xml b/.idea/runConfigurations/Jacoco.xml index 56900c5..f30fce7 100644 --- a/.idea/runConfigurations/Jacoco.xml +++ b/.idea/runConfigurations/Jacoco.xml @@ -18,7 +18,9 @@