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()
 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()
예제 #3
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
예제 #4
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
예제 #5
0
 def __init__(self):
     self.customer = Customer()
     self.soda_machine = SodaMachine()
     pass
예제 #6
0
from soda_machine import SodaMachine

if __name__ == "__main__":
    mm = SodaMachine()
    mm.load_machine()