Exemplo n.º 1
0
 public static ToGreenState GetInstance()
 {
     if (_tgsInstance == null)
     {
         _tgsInstance = new ToGreenState();
     }
     return(_tgsInstance);
 }
Exemplo n.º 2
0
 public IState Next(TrafficLight tl)
 {
     tl.CurrentLight = Light.Yello;
     return(ToGreenState.GetInstance());
 }