Esempio n. 1
0
 // This constructor will create new state taking values from old state
 public YellowState(TrafficLightState state)
     : this(state.TrafficLightProperty)
 {
 }
Esempio n. 2
0
 // This constructor will create new state taking values from old state
 public RedState(TrafficLightState state)
     : this(state.TrafficLightProperty)
 {
 }
Esempio n. 3
0
 public TrafficLight()
 {
     currentState = new GreenState(this);
 }