Skip to content

Commit 408cc75

Browse files
committed
java/2016/25: remove code related to part 2, as there is no part 2
1 parent 089227a commit 408cc75

File tree

3 files changed

+1
-34
lines changed
  • java/src

3 files changed

+1
-34
lines changed

java/src/benchmark/java/com/github/saser/adventofcode/year2016/day25/Day25Benchmark.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,4 @@ public void part1() throws IOException {
4040
Day25.part1(this.input);
4141
this.input.reset();
4242
}
43-
44-
@Benchmark
45-
public void part2() throws IOException {
46-
Day25.part2(this.input);
47-
this.input.reset();
48-
}
4943
}

java/src/main/java/com/github/saser/adventofcode/year2016/day25/Day25.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66
import com.github.saser.adventofcode.year2016.assembunny.VM;
77

88
public final class Day25 {
9-
public static Result part1(Reader r) {
10-
return solve(r, 1);
11-
}
12-
13-
public static Result part2(Reader r) {
14-
return solve(r, 2);
15-
}
16-
179
// My initial attempt consisted of trying to find a loop in the states of
1810
// the VM, based on the pattern `{0, 1}`. However, I expected the loop to be
1911
// exactly as long as the pattern, i.e., 2 states.
@@ -35,7 +27,7 @@ public static Result part2(Reader r) {
3527
// simply start by setting `a` to zero, and as long as a is less than
3628
// `bound`, we shift `a` left two times, and add `10` as the new least
3729
// significant bits. When we have found `a`, the answer is `a - bound`.
38-
private static Result solve(Reader r, int part) {
30+
public static Result part1(Reader r) {
3931
var vm = VM.from(r);
4032
for (var i = 0; i < 3; i++) {
4133
vm.run();

java/src/test/java/com/github/saser/adventofcode/year2016/day25/Day25Test.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,4 @@ public void part1Actual() throws IOException {
1616
Assert.assertEquals("correct output", output, result.answer);
1717
}
1818
}
19-
20-
// @Test
21-
// public void part2Example() {
22-
// var input = new StringReader("");
23-
// var output = "";
24-
// var result = Day25.part2(input);
25-
// Assert.assertEquals("no error", "", result.error);
26-
// Assert.assertEquals("correct output", output, result.answer);
27-
// }
28-
29-
// @Test
30-
// public void part2Actual() throws IOException {
31-
// try (var input = new FileReader("inputs/2016/25")) {
32-
// var output = "";
33-
// var result = Day25.part2(input);
34-
// Assert.assertEquals("no error", "", result.error);
35-
// Assert.assertEquals("correct output", output, result.answer);
36-
// }
37-
// }
3819
}

0 commit comments

Comments
 (0)