Пример #1
0
 public void GolpeDeLaVida(Humano context)
 {
     Console.WriteLine("<Pasan cosas...>");
     if (--this.resistencia == 0)
     {
         context.setEstadoDeAnimo(new Infeliz());
     }
 }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("<State of life>");
            Humano h = new Humano();

            h.Hablar();
            h.Vivir();
            h.Hablar();
            h.Vivir();
            h.Hablar();
            h.Vivir();
            h.Hablar();
        }
Пример #3
0
 public void GolpeDeLaVida(Humano context)
 {
     Console.WriteLine("<Pasan cosas... pero ya no le afectan...>");
 }