Example #1
0
 public static ToRedState GetInstance()
 {
     if (_trsInstance == null)
     {
         _trsInstance = new ToRedState();
     }
     return(_trsInstance);
 }
Example #2
0
 public IState Next(TrafficLight tl)
 {
     tl.CurrentLight = Light.Yello;
     return(ToRedState.GetInstance());
 }