Skip to content

Commit 4143060

Browse files
committed
cleanup
1 parent d6de732 commit 4143060

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

src/main/java/com/codefork/aoc2024/day21/PressSequence.java

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.codefork.aoc2024.day21;
22

3-
import java.util.ArrayList;
43
import java.util.HashMap;
5-
import java.util.List;
64
import java.util.Map;
75

86
/**
@@ -34,53 +32,6 @@ public static PressSequence create(Keypad keypad, String seq) {
3432
return new PressSequence(moves);
3533
}
3634

37-
// /**
38-
// * returns list of new PressSequences that are the possibilities that can result from adding the passed-in move
39-
// *
40-
// * @param keypad used to get the Button objects for the symbols, and to get the possible paths between buttons.
41-
// */
42-
// public List<PressSequence> addMove(Keypad keypad, Move move, long multiplier) {
43-
// var results = new ArrayList<PressSequence>();
44-
// var paths = keypad.getMovesToPaths().get(move);
45-
//
46-
// //System.out.println("from=" + _from + " to=" + _to + " paths=" + paths);
47-
//
48-
// for (var path : paths) {
49-
// var copy = copy();
50-
//
51-
// char first = path.charAt(0);
52-
//
53-
// // note that we use dirKeypad here, since movements match up with the directional keypad
54-
//
55-
// // add a transitional move from the last implicit "A"
56-
// if (path.length() > 1 && first != 'A') {
57-
// var transition = new Move(Keypad.dirKeypad.getButton("A"), Keypad.dirKeypad.getButton(first));
58-
// copy.moves().merge(transition, multiplier, Long::sum);
59-
// }
60-
//
61-
// var from = first;
62-
// for (var i = 1; i < path.length(); i++) {
63-
// var to = path.charAt(i);
64-
//
65-
// var moveInPath = new Move(Keypad.dirKeypad.getButton(from), Keypad.dirKeypad.getButton(to));
66-
// copy.moves().merge(moveInPath, multiplier, Long::sum);
67-
//
68-
// from = to;
69-
// }
70-
//
71-
// // this happens when a button repeats (i.e. moves from a button to itself)
72-
// if (path.length() == 1) {
73-
// var aButton = Keypad.dirKeypad.getButton("A");
74-
// var moveInPath = new Move(aButton, aButton);
75-
// copy.moves().merge(moveInPath, multiplier, Long::sum);
76-
// }
77-
// results.add(copy);
78-
// }
79-
// //System.out.println("addMove returning=" + results);
80-
//
81-
// return results;
82-
// }
83-
//
8435
public PressSequence copy() {
8536
return new PressSequence(new HashMap<>(moves));
8637
}

0 commit comments

Comments
 (0)