aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2020-11-30 12:02:37 +0900
committersyeyoung <42869671+cyoung06@users.noreply.github.com>2020-11-30 12:02:37 +0900
commit4b957f76a4e01a2385cce8fe1d140b46c28b3512 (patch)
tree3f9ccc9c5d0cab0eedf4223ae636548392dd4a9b
parent3627ec476ead432b6259931b92769d87e5b74d28 (diff)
downloadSkyblock-Dungeons-Guide-4b957f76a4e01a2385cce8fe1d140b46c28b3512.tar.gz
Skyblock-Dungeons-Guide-4b957f76a4e01a2385cce8fe1d140b46c28b3512.tar.bz2
Skyblock-Dungeons-Guide-4b957f76a4e01a2385cce8fe1d140b46c28b3512.zip
semi solution
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBoxSolver.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBoxSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBoxSolver.java
index 7206352b..f8b53d3d 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBoxSolver.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBoxSolver.java
@@ -146,9 +146,12 @@ public class RoomProcessorBoxSolver extends GeneralRoomProcessor {
if (calculate) {
if (Minecraft.getMinecraft().thePlayer.getPosition().getY() < 68) {
try {
- solution = solve(currboard, playerPos.x, playerPos.y);
- if (solution != null)
- solution.addFirst(new Move(playerPos.x, playerPos.y));
+ LinkedList<Action> semiSolution;
+ semiSolution = solve(currboard, playerPos.x, playerPos.y);
+ if (semiSolution != null) {
+ semiSolution.addFirst(new Move(playerPos.x, playerPos.y));
+ solution = semiSolution;
+ }
} catch (Error e) {
e.printStackTrace();
}
@@ -156,9 +159,11 @@ public class RoomProcessorBoxSolver extends GeneralRoomProcessor {
for (int i = 0; i < 7; i++) {
if (currboard[5][i] == 0) {
try {
- solution = solve(currboard, i, 5);
- if (solution != null) {
- solution.addFirst(new Move(i, 5));
+ LinkedList<Action> semiSolution;
+ semiSolution = solve(currboard, i, 5);
+ if (semiSolution != null) {
+ semiSolution.addFirst(new Move(i, 5));
+ solution = semiSolution;
break;
}
} catch (Error e) {