public void TransitionTo(IWaterState state) { Console.WriteLine($"Context: Transition to {state.GetType().Name}."); this._state = state; this._state.SetContext(this); }
public Water(IWaterState state) { this.TransitionTo(state); }