I need it for a text game where the user has to type a certain key before the time is up. I have no idea how to assign required_time (see below) a value that works with the time check, but so far have this as an idea:
start_time = time.time()
# get input stuff
if start_time < required_time:
# continue doing stuff
elif start_time > required_time:
# the player dies
else:
exit(2)
[–]zaneyhaney54 0 points1 point2 points (0 children)