예제 #1
0
 public void insertCard()
 {
     if (_state is nCs)
     {
         _state = new hC();
         Console.WriteLine("El estado cambio");
         Console.WriteLine(_state.GetType().Name);
     }
 }
예제 #2
0
 public void ejctCard()
 {
     _state.ejctCard();
     if (_state is hC)
     {
         _state = new nCs();
         Console.WriteLine("El estado cambio");
         Console.WriteLine(_state.GetType().Name);
     }
 }
예제 #3
0
 void setMaquina(IMaquinaState state)
 {
     this._state = state;
 }
예제 #4
0
 public Maquina()
 {
     _state = new nCs();
 }