public class Decider
extends java.lang.Object
| Constructor and Description |
|---|
Decider(TrackModelInterface trackModel,
WCStaticTrack staticTrack)
Construct a machine which does the work of determining a safe suggestion.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
suggest(boolean[] authority,
int[] speed)
Decides if the suggestion is safe,
and also calulates the necessary state.
|
public Decider(TrackModelInterface trackModel, WCStaticTrack staticTrack)
trackModel - used for dynamic information about the state of the track.
Used exclusively for isOccupied().staticTrack - used for static information about the track, such as
number of blocks, paths through the track, switch information.public boolean suggest(boolean[] authority,
int[] speed)
authority - the linear representation of suggested authority.speed - linear repr of suggested speed.