0

I am making a game where the user is able to farm the currency while AFK, but there is supposed to be a question that asks them if they'd like to convert the currency, is there any way to keep the loop going, without needing any type of input?

I have tried a few different modules, checking idle time, but nothing worked

                    store = input("Store? ")
                    if store == 'Yes' or store == 'yes':
                        choice = input("Convert ")
                        if choice == "convert" or choice == "Convert":
                            VyCoin_C = 8142
                            multiply = int(parser.get('VYCOINS', 'vycoins'))
                            print("Converting! ")
                            time.sleep(5)
                            result = VyCoin_C * multiply
                            parser.get('VYCOINS', 'balance')
                            parser.set('VYCOINS', 'balance', str(result))
                            parser.set('VYCOINS', 'vycoins', '0')
                            placeholder = 0
                            with open('config.ini', 'w') as configfile:
                                parser.write(configfile)
                            print("You've earned $" + str(result) + "!")

I was expecting to have something that would allow for when the user has not entered anything for 2 seconds, it would continue the loop, until "convert" or "Convert" are entered

Matix
  • 5
  • 3

0 Answers0