Class SolutionDay8
java.lang.Object
com.expedient.adventofcodejade.BaseSolution
com.expedient.adventofcodejade.solutions.year2024.SolutionDay8
-
Constructor Summary
ConstructorsConstructorDescriptionSolutionDay8(PuzzleInput input, PuzzleInput sampleInputOne, PuzzleInput sampleInputTwo) -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<Character, List<Coordinate>> getAntennaLists(Grid<Character> grid) Finds each type of antenna on the given input Grid, as well as the Coordinate for each antenna of each kindlonggetAntiNodeCount(Grid<Character> grid, Map<Character, List<Coordinate>> antennaLists, boolean partTwo) Finds the anti-nodes in the grid using the given antenna lists, and then provides the countpartOne(PuzzleInput input) Logic for part one of the solution.partTwo(PuzzleInput input) Logic for part two of the solution.Methods inherited from class com.expedient.adventofcodejade.BaseSolution
getInput, run
-
Constructor Details
-
SolutionDay8
-
-
Method Details
-
getAntennaLists
-
getAntiNodeCount
public long getAntiNodeCount(Grid<Character> grid, Map<Character, List<Coordinate>> antennaLists, boolean partTwo) Finds the anti-nodes in the grid using the given antenna lists, and then provides the count- Parameters:
grid- the input GridantennaLists- lists of antennas per Character antenna typepartTwo- whether this is part two- Returns:
- the count of anti-nodes
-
partOne
Description copied from class:BaseSolutionLogic for part one of the solution. Must be overridden when implementing the solution.- Specified by:
partOnein classBaseSolution- Parameters:
input- the PuzzleInput to be used for the solution- Returns:
- output of this part of the solution
-
partTwo
Description copied from class:BaseSolutionLogic for part two of the solution. Must be overridden when implementing the solution.- Specified by:
partTwoin classBaseSolution- Parameters:
input- the PuzzleInput to be used for the solution- Returns:
- output of this part of the solution
-