Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Position tempPos;
- private int distanceFromRoot = 0;
- private int[] toStoreInStack = new int[3];
- private int[] tempStore = new int[3];
- private ArrayList<int[]> stack = new ArrayList<>();
- if (findValidPosition(tempStore[0], tempStore[1]))
- {
- distanceFromRoot++;
- toStoreInStack[0] = tempPos.getX();
- toStoreInStack[1] = tempPos.getY();
- toStoreInStack[2] = distanceFromRoot;
- stack.add(toStoreInStack);
- System.out.println(Arrays.toString(stack.get(distanceFromRoot)));
- System.out.println(Arrays.toString(stack.get(0)));
- }
- [1, 2, 1]
- [1, 2, 1]
- [1, 3, 1]
- [1, 2, 1]
- [1, 4, 1]
- [1, 2, 1]
- [1, 2, 1]
- [1, 2, 1]
- [1, 3, 1]
- [1, 3, 1]
- [1, 4, 1]
- [1, 4, 1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement