public string checkApplication() { int yesno = random.Next() % 10; if (yesno > 4 && automat.getCount() > 0) { automat.setState(automat.getApartmentRentedState()); return("Congratulation,you're approved."); } automat.setState(automat.getWaitingState()); return("Sorry,you're not approved."); }
public string rentApartment() { automat.setCount(automat.getCount() - 1); return("Renting you an apartment...."); }
public String rentApartment() { automat.setCount(automat.getCount() - 1); return("Renting you an apartment....\n" + dispenseKeys()); }
public String rentApartment() { automat.setCount(automat.getCount() - 1); Console.WriteLine(dispenseKeys()); return("Renting you an apartment...."); }