I've been having a really hard time putting this problem into words. What I'm trying to do is to have a while-loop constantly running, unless I give a 'stop' command.
I'm making a fishing mini-game in a bigger game, and I want to be able to start fishing on command (which I have been able to do), and for the fishing to continue happening, until I eventually type 'stop'.
The way I've been doing things is that I ask for a command input, then do something based on the command. However, in this situation, I dont want to do that, because asking for the input pauses the while-loop.
I'm open to other suggestions on how to exit the while-loop with a certain command, but the game is text-based, so ideally I want a text command to exit.
if command == 'fish':
print('You start fishing')
while True:
# fishing happens, you may or may not catch something
# if you enter a command ('exit'), you stop fishing
# I dont, however, want the code to pause to ask for a command.
# I want it to be uninterrupted fishing, until I choose to exit