def run_simulation(self):
     """The central method called in main.py."""
     customer = Customer()
     soda_machine = SodaMachine()
     will_proceed = False
     while will_proceed:
         user_option = user_interface.simulation_main_menu()
         if user_option = "1":
             soda_machine.begin_transaction(customer)
         elif user_option = "2":
             customer.check_coins_in_wallet()
Esempio n. 2
0
 def run_simulation(self):
     """The central method called in main.py."""
     will_proceed = True
     while will_proceed:
         user_option = user_interface.simulation_main_menu()
         if user_option == 1:
             self.soda_machine.begin_transaction(self.customer)
         elif user_option == 2:
             self.customer.check_coins_in_wallet()
         elif user_option == 3:
             self.customer.check_backpack()
         else:
             will_proceed = False
 def run_simulation():
     """The central method called in main.py."""
     customer = Customer()
     soda_machine = SodaMachine()
     while True:
         user_option = user_interface.simulation_main_menu()
         if user_option == 1:
             soda_machine.begin_transaction(customer)
         elif user_option == 2:
             customer.check_coins_in_wallet()
         elif user_option == 3:
             customer.check_backpack()
         elif user_option == 4:
             quit()
Esempio n. 4
0
 def run_simulation(self):
     """The central method called in main.py."""
     customer = Customer()
     soda_machine = SodaMachine()
     will_proceed = False
     if not will_proceed:
         user_option = user_interface.simulation_main_menu()
         if user_option == 1:
             soda_machine.begin_transaction(customer)
         elif user_option == 2:
             customer.check_coins_in_wallet()
         elif user_option == 3:
             customer.check_backpack()
         else:
             will_proceed = False
             return will_proceed
Esempio n. 5
0
 def run_simulation(self):
     """The central method called in main.py."""
     customer = Customer()
     soda_machine = SodaMachine()
     soda_machine.fill_inventory()
     soda_machine.fill_register()
     will_proceed = True
     while will_proceed:
         user_option = user_interface.simulation_main_menu()
         if user_option == 0:
             soda_machine.begin_transaction(customer)
         elif user_option == 1:
             customer.check_coins_in_wallet()
         elif user_option == 2:
             customer.check_backpack()
         elif user_option == 3:
             will_proceed = False