overhauled route search algorithm:
now using breadth-first search instead of depth-first search
This commit is contained in:
@@ -28,7 +28,7 @@ public class SetTurnout extends Action {
|
||||
public boolean fire(Context context,Object cause) {
|
||||
if (context.invalidated()) return false;
|
||||
if (isNull(turnout)) return false;
|
||||
if (!turnout.state(state).succeeded()) return false;
|
||||
if (!turnout.state(state,false).succeeded()) return false;
|
||||
if (turnout.address() == 0) return true;
|
||||
sleep(1000);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user