I want to write a code for snake and ladders game in python3.9.I include the input function in my code to press the enter key so, that the user will get random number from 1-6. The condition for my code is if the player doesn't press enter key within the time limit 5sec then I have to skip the player chance and pass the chance to the next player. Now my doubt is how to set the time limit for taking input from user and if the user press enter within time limit then he got dice value or else pass the chance to next player.
Asked
Active
Viewed 94 times
0
-
1I guess this question was already answered here : https://stackoverflow.com/questions/15528939/python-3-timed-input – profbreach Jun 14 '21 at 10:34
-
1Does this answer your question? [Python 3 Timed Input](https://stackoverflow.com/questions/15528939/python-3-timed-input) – sophros Jun 14 '21 at 14:15