-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package jab.aoc.day17; | ||
|
||
import jab.aoc.Day; | ||
import jab.aoc.Utils; | ||
|
||
import java.util.Deque; | ||
import java.util.LinkedList; | ||
import java.util.stream.IntStream; | ||
|
||
public class Day17 implements Day<Long> { | ||
|
||
@Override | ||
public Long getPart1Result(String fileName) { | ||
|
||
var commands = Utils.readFileToString(fileName).replaceAll("\\n", ""); | ||
System.out.println(commands); | ||
System.out.println(commands.length()); | ||
|
||
Deque<String> game = new LinkedList<>(); | ||
|
||
IntStream.rangeClosed(0, commands.length() - 1).boxed() | ||
.map(commands::charAt) | ||
.forEach(System.out::println); | ||
|
||
return null; | ||
} | ||
|
||
@Override | ||
public Long getPart2Result(String fileName) { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package jab.aoc.day17; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.BDDAssertions.then; | ||
|
||
class Day17Test { | ||
|
||
@Test | ||
void given_sampleData_when_execute_day17_getPart1Solution_then_expected_result() { | ||
//Given | ||
String fileName = "day17/input-sample.txt"; | ||
|
||
//When | ||
Day17 day17 = new Day17(); | ||
var result = day17.getPart1Result(fileName); | ||
|
||
//Then | ||
then(result).isEqualTo(3068); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
>>><<><>><<<>><>>><<<>>><<<><<<>><>><<>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
>><<<>>>><<<><>>><><<<<>>>><>>>><<<<>><<<<>>>><<<<>>>><<<>>>><<<>><<<<>>><<<<><><<>>><>>>><<<>>><<><<<><<<>>><<>>><<<><<><<>><<>><<<>>>><<<<><<>>>><>><<<>><<>>><<<>>>><<<<>>><<>>><><<<>>><<>>>><>>><<<<>>>><<>><<<<><<<<>><<<<>>><<>>><<<<><>>>><<<><<<<>><>>><<<<><<>>><>><<><><<>>><<<>>><<<<><<>>><><<<>><><<<<>><><<<>><<<>><>><>><<><<<<>>>><<<<>>><><<<><<>>>><<><<>><<>><><<<>>><>><<<>><<<><<><><<>>><<>>>><<<<>>>><<><<>><<<><<>><<<<><>>><>><<>>>><<<<>>><<<>>><<<>>><>>><>>><<<<>>><<<<><<<<>>>><>><<><<>><<<><><>>>><>>>><<<><<<><<<><<>><<<>>><<<>>><<<>>>><<>>><<<>><<<>>><<<<><<<><<>><<<><<>>><<<<>><<<><<<>><<<>><<>>>><<>><>><<<><<<<>>>><><<>><<>>><<><<>>><<>>>><<>>><<><<<<>>><<<>>><><<<>><<><<<><>>>><<>>><<<<>>>><<>>><<<<><<<<>>><<<<>><<><<<<><<><<<><<<<><><<>>>><<>>>><>>><<>>>><<<<>><><<<>>>><<>>><<<>>>><<>><<>><<<<>>><<<>><<>><<<<>>><>>>><<<>>>><<<>><<<<>><<>>><<<>>><<>><<<><<<>>>><<>>><>><<>>>><<>>><>><>><<<<>><<<<>>>><<>><<<>><<<>>><<<>><<>>><<>>>><<>><<>><<><<<<><<<>>>><>><>><<<<>><>><<>>>><<<>><>>><<>><>><>>>><<<<>>><<<>>><>><<<<>>><<<<>>><><<<><<<><<<>>>><<<<><>>>><<><<<>>>><<>>>><>><>>><<<>>>><<<>>>><>>><<<<>>><<<><>>><>>>><<<>><><<<<>>><<<<>><<<><<<<><<<>>><<<<>>><<<<>><<<><>>><<<><<>><<<<>><<<<>>><<>>><<<>>><<<<>>><>><<<>>>><<<<>><<<>><>>><<<>>>><>>>><<><<<>>>><>>>><<<<>>><<<<><<<><<<>>>><<<>><<<<>>>><<<<>>>><<<<><<<>><>>><><<<<>><<<<>>>><<>><<>><<>><<<>>>><<>><<<<><<<<>><>><<<<>>><<<>>><<<>>><<<<><<>><<<<><<>>><<<>>><<<>><><>><<>><<<<>>><<<<>>>><<<>><>>>><<<<><>>>><>>><<<<>><<>>>><<<<>>><<<>>>><>>><<<><<><<<>><>>>><<<>><<<<>>><>>><<<>><>><<<>>>><<<<>>>><<>><<<>>><<<<>>><<<<><>><<<>><<<>><<<>>><>>><<<>><<<<>>><<<<>>><<<<>>><<<<>><<<<>><<<<>>><<<<>>>><<<>><<<>>><<>>>><<>><<<>>>><<<>><<>>>><<<>><<<<>>><<<<><<>>><>><>>>><<>>>><<<<><<<><<><<<><<<<>><><<<><<<>><<<><<>><<<<>>><<<>><<>>>><><<<><><>><>><<<<>><<><>><<<>>><<<>>>><<<><<<>><<>><<>>>><<<<><<>><>><<<>>>><<><<<>>><>>>><<<<>>>><<>>><<>>><<<>>>><<<>>>><<>><<<>>>><<<<>><<<>><<<<>><>><<>><<<>><<<>><<>>>><<<>><<<>><<<<>><<<<>><<<<>>><<<><<<><<<<>>>><<><<<<><<>><>>><<<<>>><<<<><<<<><<<>>><<<><<<>>>><>>><<>>>><>><><<><<<<>>><<<>>><>><<><<<>><<<<>>>><<>>><<<<>><<<><<<>>><<>>><>>>><<>>><<<<>><><<>><<><<>>>><<><<<<>>><<<>>>><>>><<>>><<>>><<>><<<><<<<>><>>>><>>><<<><<<<>>>><<<<>>><>>>><<<<>>><<<><>><><<<<>>><<>>>><<>>><<<>><<>>>><<<>>>><<>>><<>>>><>>><<<<>>>><<<<>>><><<<<>>>><><<<<>><<>>>><<><<>>>><<<><><>>>><><<<<>><<<<>>><<>><>><<<><<<<>>>><<<>>><<<<><<>>>><<<>>>><<<<>>><<<><<<>><<<>>>><<<<>><>>>><<<>><<<>><>>>><<>>>><><<<>>><<<>>>><><<>>><<<><<<><>>>><<>>><<<>>>><><>><><>>>><><<<<><<>><<<>>><>>><<<<>>>><<<<>>>><<<<>>><<><><<>>><<<<>><>>>><<>>><<<>>><<<<>>><<<<>><>><<<<>>>><<>><<>><<<<>><<<<>>>><>>><<<>>>><<<>><<<<>>>><>>>><<>><>>>><>>><<>>>><<<>>>><<<<>><<<<>>>><<<><<<<>>><>>><<<<>><<<<>><>>><>><<<<><<<>><<<><<>><>>>><<<<>><><<<><>>><<<><<>><<<<>>>><<><<<>>><<>><<<><<><<<<>>><<<<><<<><<<>>><>><<<><<<>>>><>>>><<<>>>><<<<>>>><<<>>><><<>>>><<>>>><><<>>><>>>><<<>>><>>>><<<><<<<>><<<>>><<><<><>>>><<<>>><><<<>>><>><>>><<<<>>><<><<<<>>><<<<>>><<>><<>>><<<><<<<>>><<><<<>>>><<<<>>><<<>><>>><<<>><<<>>><>>>><<>><<<<><<>>>><<>>>><<<><<>>>><><>><>>><>><<>><<<<><<><<>>>><>><<<>>><>>><>>>><<<>>>><<<>><<<>><<>><><<<<><<<<>>>><<>>>><<>><<<>><<>><<<<><<<>><>>>><<>>><<<<>><>>><<<<>><<<<>>><<<<><<<>><<<>>>><<<>>><<<>>>><<<<><<<<>>>><<>><<>>><<<><<<>>>><<>>><>><<>>>><<<>>>><<>>>><>>><>>><<>><<<<><<<<>><<<<>>><<<<>><>><<<>><>>>><><<<<>>>><>><<<>>>><<<><<>>><<><><<<>>><>><<><>>><<<<><<>><<<>><<<>>><<>>><<<>>><<<><<>><>>>><>><<<<>><><>>><>>>><>>><<<>>><<>><<<><>>><>>><<>>>><<<><<<<>>><<<<><<>><<<>>>><<<>>><<<><>>>><><<><<<<>>><<<<>><<<<>><<>>><<>>>><>>>><<<><<<><>>>><>><<>>><<>>>><<<<><>><><<<><<<>>><<<<>><<<><<<><>>><<<>>><>>><<<<>>><><>>>><<<<><<<<>>><<>>><<>>>><<<<>>>><>>><><<>>>><><<<>>><<<>>>><>><<>>><<<>>>><>>>><<<<>>>><>><<<>>>><>><>>>><<><>>><<>>><>>>><<<>>>><<<<><<<<>>><<<<>>>><><>><<><<><<<<>>>><<><<>><<>><<<>><<<<>>>><><><<>><>>>><>>><<>>><<>><<<<>><<>><<<<>>>><>>>><<>>>><<<>>>><<<<>>>><<>>><><<<<>>><<>><>>><<>>>><<<<>>><<<<>>><<>>><<><<<<>>><>>>><<<>>>><<<<><>>>><<<<>><<<<>>>><<>><<<>><<<<>>><<<<>><<<>><>>><<<>>>><>>>><<<><<<>>>><<<>>><<<<><<>>><<<>>><<>><><<<<>>>><<><<<>>><<<>>><<<>>><<<<>><<<<>><<<<>>>><<<><>><<><<<<>>>><<<<>><<<>>>><><<<>>><<<><>>>><<>>>><<<<>>>><<<<>>><<>><<<>>><<><<>>><<<>>>><<<<><<<<>>>><<<>>>><<<>>>><<><<<>>><<<>>><>><<>>><<<><<<>>>><<<>>>><<>>>><<<<>>>><<>>><>>><<<<>>><<<<><<<>>><<<><<<<>>>><><<>>><>>>><<>>>><<<>>><>><<<>>><<<>>><<>>>><<<<><<>><<>>>><<<<>><<>>>><>><<<<>>>><<><<<><>>>><<<<><<<>><<>>>><>><<>><<<<>>>><<<<>><<>>>><<>>><><<<<>><><<<<><<<<>>>><><>><<<<>><<<>>><>><<<><<<>><<<<>>>><>>><<<<>>><<<<><<>>><<<<>>><<<<><<<<>>>><>>>><<<>>>><>>><<>>>><<<<>><<><<<>>><<<>>>><<><<<<>>><>><<>>>><<<<>><><>><<><>><>>><<><<<>><<<<><>>><<<<>>><>>><>>>><>>><<>>>><<<<>>>><<<<>><>><<<<><<<<><<<<>><<<>>>><<<><<<>><>>><>>><<>>><<<<><<><<>>><<<>><<<>>><><<>>>><<<<>>><<<>>>><<>><<<>>>><<<<>>><<<<>>><>>><<<>>><<>><<<>>>><>>>><<>>><>><>><<>><<>>><<<<>>>><><><<>>>><<<>>>><<><<<>>>><>><>>><>>><<>><>>>><>><<>>><<<<>>><<<>>><<<>>>><<><<<>><><<>><>>>><<>>>><<<<>>>><>><><<<<>><<>>>><>><><>>><<<>>><>>>><>><<<<>><>><>><<<>>><><<>><>><<>><<<<>>>><><<>>><<<>>>><><<<><<<<>>>><>>><<>>><<<><<<<>><<<>>>><<<>>><<<>><>><<<<><<<<><<<>>>><<<>>><<><<<>>><<<<>>>><<<>>><><<<>><<<><<>>>><><>>><<<><<<>><<>>>><<<>><<<<><<><<<<>>><<>>><<<<>>>><<<>>>><<<<>>><<<<>><>><<>>><<><<<>>>><<<>><<<<><<>>>><<<<>><<<<>><<>>>><><<<<>><<<<>>><<<<>>>><<>>>><>>>><<>><<>>><<<>><<><<<>>>><<>>>><<<>><<<><<>><<><<<>><<<<><<>>>><>>><<>>>><<<><<>>>><<<>>>><<<>><<<<>>>><<<<>><<<<>><>>><>>>><<>>>><<><<>>><<<<><<>>>><>><<>><>>>><<<<>>><<<<>><<<<>>>><<<<><<<<><<><<><><<>>>><>><>>><<<<>><<>>><>>>><><<<><<>><<<>>>><<<<>><<<<><<>><<<><<>><<<>>><>><<<>><<>>>><<>><><><<<>>>><<<><<<>>>><>><<<>>><<<>>>><<>>>><<<<>>>><>><<<>><<<>>>><<<<>>>><>><<<<><<<>>><<<<>>><<>>><>>>><><>>>><<>>><<<>>>><>><<<<>>>><<>>><<><<><<<<>>>><<<><<<<>>>><<>>>><<<><<>>>><<<<>>>><<<<>>>><<<>>><<<<>>><<<><<<><<<>><<>><>>><<><<><<<<>><<<<>>>><<<<><<>>>><<<>><<<>>><<<>>><<<<><<<<>>><<<<>><<<>><>>><<>>><<<<>>><><<><<<>>><>><>>><<<>>>><<<>>><<<<>>>><<<>>><<<><<<><<<>>>><>>>><<<<>>><<>>><<>>>><<<><<<>>><<<>>>><<<<><<<<>>><<>><>>>><<<<><>><>><<>>><<><<<>>>><<<<>><<<<>><<>>>><<<<>>><<<<><>><<<>>>><<<<>>>><<<>>><<>>><<>>><><>>><><<<<><<<<>><<><><<><<<<>><<<>>>><<>>><<<<>><<<>>><<<<>>>><<<<>>>><<<>><<<><<>>><>>><<<<>><<>>><>><<<<>>><<<<>>>><<>><>>>><<<<>>><>><>><<<>>>><<<>>><<<>><<<<>>>><<<>>><<<>>>><<>><>>><<<<>>><<>><<<><<<>><<<>><<<>><<<<>><<<><<>>><><<<>>>><<<<>>><>>><<>>>><<<><<>>><>>>><><<>><<>><<<<>><<<<>>><<<>>>><>>>><<<><><<<<>><<>>>><<<<>>>><<<>>><<<<>>>><<<>>><<>>><<>>>><<>>><>>>><<<>><<<><>><<<><<><>>><>>>><<<>>><<>>>><<>><>><>>>><<<<>><<>>>><<><<>>><>><<<<><<><<<>>>><<<<>>><>>>><<<>>><<<<><<<>>>><<>>>><<<<>>>><<><<<<><><<>>><<<<>><>><<<>><<><>><<>>>><<<<><<<><<<>>><<<><<>>><<>>>><><<>>>><<>><>>>><<<<>>>><>><<><<<<>>>><<<<>>><<<>><<<>>><<>>><<<<><>>><<><>><<<<><>>>><<<>>><<<<><<><>><<<>>>><<><><><<>><<>>>><<<<>>><<<>>>><<<>><>>>><>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><>>>><<>>>><<<>>><<<<>><<<>><<><<>><>>>><<<><<<>>>><<<>>><<<>>>><<<>>>><<<>>>><<<<>><<<<>>><<<>>>><<><<<<><<<<>>>><<<<>><<<<>>>><<<>>><<<<>><<<<>>>><><<<<><<<<><>><<<>><<<><<>><<><<<>><<>><<>>>><<>>><>>><<<<>>><<<<>><<<<>>>><<<>>>><>><>>>><>>>><<>>><<<>><<>>><<<<><<<<>>><<<>>>><<><<>><<<<>><<<><<<>>><><<<<>><<<<>><<<>>>><>>>><<>>><<<<>>><<<<>>><<>>>><<<>>><<<<>>>><<<<>>><<<><><<<>>>><<<>><>>>><<<<>><<><<><<<><<<><>><<>>>><<<><<<<>><>>>><<>>>><>>><<<<>>><<<<>><<>>><<<>>><<<<>><<<<>>>><<<><>>><<<<>><>><<<><<<>>>><>>><<<<>>><<<>><>><>><<<>>>><<>>>><<<><<>>><<<<>>>><<>>><<<>><<<<>>><<>>><<<<><<<<>>>><<>>>><<<<>>>><<<<>>>><<><<<>><<<<>><<<>><<<>><<<<>>><>>><<<><>>>><<<<>>>><<>>>><<<>><<<<><><<<<>>><<<<>>>><<>>><<>>><<<>><<<<>>>><<<<>>>><>><>><<<<>>>><<<>>>><<><<<><<>><<<<>><<<>><<<<>><>>>><<<<>>>><<<<>>>><<<>>>><<<<>>><<>>>><<>>>><><<<>><<<>>><<<><<>>><><<<><>>>><<<<>>><>><>><<>>>><<<<>>>><<<<>>><>><<<<><<>>><>>>><<>><<>>>><<>>><<<<>>><<<>>><>><<<>><<<>>>><<<>><<<>><<>>><>><<<<>>><<<<>><<<><<<>><<<<>>>><<><<<>>><<<<>>><<><<><>>>><<<>>><<<>>>><<<>><<<>><<<<>><<<<>>><<<<>>>><<<>>><<<>><<<<>><<<>>>><><<><<><>><<<>>><<>>><<<<>>>><<<<>>><<<><<>><<<><<<<>><<<<>>><<<<><>>><<<>><<><><<<>>>><<<<><<<>>><<<>>>><<<<>>>><<<>><<<<>>>><<<><<<<>><<>>>><<<>><<>>>><<><<<>>>><><>><<<<>>><><<<>>>><<<><<><<>>><<<<>>><<<>><>><<<><<<>><<<<><<<<>><<<<><<<<>><><><<<><>>><>>><>>>><<<<>>>><<<>>><><>>>><<<<>>><<<>>><<<<>><<<>><<<><<><<><<>>>><><<<>><<><>>><<<<>>><<<<>>><<><<<<>><<<<><<<><<<>>>><<<>><<<>><<<<>><<<<><<<>>>><<<<><<<<>><<<<><<<<>>><<<<>>><>>><<<<>><<>>>><<<>>>><<<<>>><<>><<<<>><>>><>>>><<><<>>>><<>><>>>><>>><>><<>>>><<<<>>>><<<<><<<<><<<>>><<<>><<<<>>><><<<<>><<<<>><><<<<>>><<<<><<><<><<>><<<><>>>><<<<>><>><<>>>><<<>>>><>><>><<>>>><>><><<<>><><>>><<>>><<>><>>><>>>><<<<>><<>>><<>>><>><<<>>>><<<>><<<>>>><<<<>><<<<>>><<<>>>><<<<>>><>>><><<<<>>><>><<<>><<<<><<><<<>><<>>><<><<<<>>><<<>>><<<><>><><<<<>>>><<<><<><>><<>>>><<<>>><<<>>><<<><>><><<>>><<><<>>><><<>>>><>>><<<<>>><<>>><<<<><>><<<><><<<<><<>>><<>>>><<<>>><<<>><<>>>><<<><<<>><<>>>><<>>><<<<>>><<<>>>><<>>>><<<<><<>><<>><<><>>><<><<<<>><<>><<<>><<<<><><<<<>>><>><<<<>>>><<<>>>><<<<>><>>>><>>>><<<<><<>>><<<<>><<<<>><<<>><<<>><><<<<><<><<<><>>>><<<<>>>><>><><>><<<<><<>>>><<><>><<>>><<<<>>>><<<<>>>><>>>><<>>><<<>>>><<>>><<<>>>><<<<>><<<><>>>><<>><<>>><><<>><<<>>>><><<>>>><<<>><<<<>>><><>>><<<><<>>><<<<>><<<>><>><<<>>><<<<>><<<<><<<<>>><<<<>>>><><<<<>><<<<>><<<><<>><<><<<>><<<>><<>>>><>><>><<>>><<><<>>>><>>><<><<<><<>><<>><<><>>>><<>>><<><<<>>>><<<<><<>>>><<><<><<<>>><<><<<>><<<<>><<<<><<>><<<>>><<>>><<<<>>><<>><<<>>>><<<<>>>><>>>><<<<>><<>><<<<>>><<><<<>>>><<<>><<<<>><<<>>>><>><<>>>><<<<>>><<<<>>>><>>>><<<<>><>>>><<<<><<<<>>><<>>><<<<>><<>>>><><<>><<>>><<<>><<<<>><>>><>>>><>>><<<<><>>>><<<>><>>><<<<>><<<>>><<<><<<>>><<<<>>>><<<>>>><>>><<>><<>><<>>><<<<>>>><<<<>>><<<>><<><<<>><>><<<>>>><<<>><<<>><<<>>>><<<><>><<<>>>><<>>>><<>>><<<>>><>>>><<<<><<<<>>>><<>><<<<><<<<>>><<>><<<>><>>><>>>><<<<>>>><<<>><<>>><>>>><<>><<>>><<><<><<>>><<>><<<>>>><<>>>><<<<>>> |