Skip to content
Snippets Groups Projects
Commit 6be0299c authored by Enes Herguel's avatar Enes Herguel
Browse files

Maze-ready!

parent 9f23ffc7
No related branches found
No related tags found
No related merge requests found
......@@ -39,13 +39,10 @@ public class Explorer {
(int) SharedRessources.getInstance().getVisitMatrix()[index]
.getZ();
if (currentStepsOnField <= steps + SharedRessources.getInstance().getEpsilon()) {
if (currentStepsOnField <= steps) {
return;
}
boolean wall =
SharedRessources.getInstance().getWallMatrix()[index];
if (wall)
......
......@@ -17,7 +17,7 @@ public class WorkingExplorers extends EagerWorkingThread {
}
private ConcurrentLinkedQueue<Explorer> currentWaitingExplorers = new ConcurrentLinkedQueue<Explorer>();
private ConcurrentLinkedQueue<Explorer> currentWaitingExplorers = new ConcurrentLinkedQueue<Explorer>(); // suited for maze only!!!
@Override
public void onBegin() {
......
......@@ -55,15 +55,6 @@ public class SharedRessources {
private Object signalingObject;
private int epsilon;
public void setEpsilon(int epsilon) {
this.epsilon = epsilon;
}
public int getEpsilon() {
return epsilon;
}
public Object getSignalingObject() {
return signalingObject;
......
......@@ -23,7 +23,6 @@ public class MainWindow extends Game {
@Override
public void loadGame() {
SharedRessources.setMaximumCores(Integer.MAX_VALUE);
SharedRessources.getInstance().setEpsilon(0);
try {
MapLoader.getDefault().load(ImageIO.read(new File("c:/users/enesh/desktop/tests/maze2.png")));
} catch (IOException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment