public string DispenseKeys() { if (automat.Count <= 0) { automat.SetState(automat.GetFullyRentedState()); } else { automat.SetState(automat.GetWaitingState()); } return("your keys"); }
public string DispenseKeys() { if (_automat.Count <= 0) { _automat.SetState(_automat.GetFullyRentedState()); } else { _automat.SetState(_automat.GetWaitingState()); } return("Here are your keys!"); }
public string CheckApplication() { var yesNo = _random.Next() % 10; if (yesNo > 4 && _automat.Count > 0) { _automat.SetState(_automat.GetApartmentRentedState()); return("Congratulations, you were approved."); } else { _automat.SetState(_automat.GetWaitingState()); return("Sorry, you were not approved."); } }
public string CheckApplication() { var yesno = random.Next() % 10; if (yesno > 4 && automat.Count > 0) { automat.SetState(automat.GetApartmentRentState()); return("You were approved"); } else { automat.SetState(automat.GetWaitingState()); return("you not approved"); } }