Currently, trains do not stop before a signal if the signal aspect is red or slow down if the signal aspect is amber.
This should be fixed because as per the functional spec,
Red: The train shall come to a complete stop just before the signal.
Green: The train can travel at any speed as long as it does not exceed MPS.
Amber: The train can travel at a speed that does not exceed half of the MPS.
[ ] Convert Stations into Observables. Ensure Train has both stops & stations.
[ ] On game load, Trains should register for the relevant upcoming Station as an observer.
[ ] Once train crosses the station, it should deregister as an Observer for that station.
[ ] Once train crosses the station, it should register as an Observer for the next station.
Currently, trains do not stop before a signal if the signal aspect is red or slow down if the signal aspect is amber.
This should be fixed because as per the functional spec,
Station
s intoObservable
s. Ensure Train has bothstops
&stations
.Station
as an observer.Observer
for that station.Observer
for the next station.