Пример #1
0
 private void RentPaid(RentPaid rentPaid)
 {
     if (_rentersAccount.Amount() > _currentRent.Amount())
     {
         _rentersAccount.Remove(new Rent(_currentRent.Amount()));
         RentPaidToday = true;
     }
     else
     {
         World.NavigateToScene("Evicted");
     }
 }
Пример #2
0
        static void HomePayment()                                                                   // method containing if statment that will determin via user input whether or not they will be renting , buying or not paying rent etc.
        {
            Console.WriteLine("Please type 1 if renting a home or 2 if you are paying off a home loan. ");

            Console.WriteLine("If neither press 3 else press anything else to exit");

            var answer = Console.ReadLine();

            if (answer.Equals("1"))                                                                 // if statement for determining living status costs
            {
                Console.WriteLine("Please enter how much is spent on rent per month: ");

                Rent amount = new Rent();

                amount.PrintLine();

                amount.Amount();
            }
            else if (answer.Equals("2"))
            {
                var amount = new HomeLoan();

                amount.Amount();
            }

            else if (answer.Equals("3"))                                // if user chooses 3 the program continues with R0 paid for living expenses
            {
                Expense.Expenses.Add(0);                                // Rent free in your head- Cranberries zombie
            }
            else
            {
                Environment.Exit(0);
            }
        }