Sort the destinations from the start
Signed-off-by: Chris Cromer <chris@cromer.cl>
This commit is contained in:
parent
804ab0acef
commit
dbb524a7c7
@ -306,6 +306,8 @@ public class Canvas extends java.awt.Canvas implements Constants {
|
|||||||
player.getAi().addDestination(new State(key.getCell().getX(), key.getCell().getY(), State.Type.KEY, null, 0));
|
player.getAi().addDestination(new State(key.getCell().getX(), key.getCell().getY(), State.Type.KEY, null, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.getAi().sortDestinations();
|
||||||
|
|
||||||
Thread thread = new Thread(player.getAi());
|
Thread thread = new Thread(player.getAi());
|
||||||
thread.start();
|
thread.start();
|
||||||
aiThreads.put(player.getAi(), thread);
|
aiThreads.put(player.getAi(), thread);
|
||||||
|
Loading…
Reference in New Issue
Block a user