public void Heat(Water water) { Console.WriteLine("Heat water tp gas"); water.State = new GasWaterState(); }
public void Frost(Water water) { Console.WriteLine("Frost water to solid"); water.State = new SolidWaterState(); }
public void Heat(Water water) { Console.WriteLine("Превращаем жидкость в пар"); water.State = new GasWaterState(); }
public void Frost(Water water) { Console.WriteLine("Превращаем жидкость в лед"); water.State = new SolidWaterState(); }
public void Frost(Water water) { Console.WriteLine("Transform water state from gas to liquid"); water.State = new LiquidWaterState(); }
public void Heat(Water water) { Console.WriteLine("Do not change gas water state"); }