diff options
author | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-12-06 23:57:47 +0900 |
---|---|---|
committer | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-12-06 23:57:47 +0900 |
commit | 8345651586a5c68cfb36f3f3eb1a2a97ceb3a4b7 (patch) | |
tree | 5803acc6e235106489b18b349cfee7fea0cc36c6 /src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle | |
parent | db588ef9127160dffd3b3cd8c4498bd429a7c746 (diff) | |
download | Skyblock-Dungeons-Guide-8345651586a5c68cfb36f3f3eb1a2a97ceb3a4b7.tar.gz Skyblock-Dungeons-Guide-8345651586a5c68cfb36f3f3eb1a2a97ceb3a4b7.tar.bz2 Skyblock-Dungeons-Guide-8345651586a5c68cfb36f3f3eb1a2a97ceb3a4b7.zip |
trivia and better box solver
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle')
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java index f4412419..8c63694b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java @@ -23,6 +23,7 @@ public class BoxPuzzleSolvingThread extends Thread { this.playerX = playerX; this.playerY = playerY; this.callback = onDone; + System.out.println("new solving thread"); } Route solution = null; @@ -33,8 +34,8 @@ public class BoxPuzzleSolvingThread extends Thread { public void run() { solved = false; solution = solve(data,playerX,playerY, 20); - callback.run(); solved = true; + callback.run(); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java index 3b88de2d..e907671a 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java @@ -25,7 +25,7 @@ import java.util.List; public class RoomProcessorBoxSolver extends GeneralRoomProcessor { - private BlockPos[][] poses = new BlockPos[6][7]; + private BlockPos[][] poses = new BlockPos[7][7]; private boolean bugged= true; private BoxPuzzleSolvingThread puzzleSolvingThread; @@ -92,7 +92,6 @@ public class RoomProcessorBoxSolver extends GeneralRoomProcessor { puzzleSolvingThread.start(); } if (calcReq) { - OffsetPointSet ops = (OffsetPointSet) getDungeonRoom().getDungeonRoomInfo().getProperties().get("board"); if (ops != null) { poses = new BlockPos[7][7]; @@ -105,6 +104,8 @@ public class RoomProcessorBoxSolver extends GeneralRoomProcessor { } calcDone = false; + if (puzzleSolvingThread != null) + puzzleSolvingThread.stop(); puzzleSolvingThread = new BoxPuzzleSolvingThread(currboard, 0, 6, new Runnable() { @Override public void run() { |