示例#1
0
 public Automat(int n)
 {
     _count                = n;
     _waitingState         = new WaitingState(this);
     _gotApplicationState  = new GotApplicationState(this);
     _apartmentRentedState = new ApartmentRentedState(this);
     _fullyRentedState     = new FullyRentedState(this);
     _state                = _waitingState;
 }
示例#2
0
 public Automat(Int32 n)
 {
     _count = n;
     _waitingState = new WaitingState(this);
     _gotApplicationState = new GotApplicationState(this);
     _apartmentRentedState = new ApartmentRentedState(this);
     _fullyRentedState = new FullyRentedState(this);
     _state = _waitingState;
 }
示例#3
0
 public Automat(Int32 n)
 {
     count                 = n;
     waitingState          = new WaitingState(this);
     gotApplicationState   = new GotApplicationState(this);
     appartmentRentedState = new ApartmentRentedState(this);
     fullyRentedState      = new FullyRenteState(this);
     state                 = waitingState;
 }
示例#4
0
 public void SetState(IAutomatState s)
 {
     _state = s;
 }
示例#5
0
 public void SetState(IAutomatState s) { _state = s; }