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();
 }
Esempio n. 3
0
 public void Heat(Water water)
 {
     Console.WriteLine("Превращаем жидкость в пар");
     water.State = new GasWaterState();
 }
Esempio n. 4
0
 public void Frost(Water water)
 {
     Console.WriteLine("Превращаем жидкость в лед");
     water.State = new SolidWaterState();
 }
Esempio n. 5
0
 public void Frost(Water water)
 {
     Console.WriteLine("Transform water state from gas to liquid");
     water.State = new LiquidWaterState();
 }
Esempio n. 6
0
 public void Heat(Water water)
 {
     Console.WriteLine("Do not change gas water state");
 }