Rename main.py to Beta1.py

This commit is contained in:
2023-02-02 11:54:13 +03:00
parent 7dbcf6cdd7
commit 77a9ac3e36

34
main.py
View File

@ -1,34 +0,0 @@
#imports
import keyboard as kb
import time
import random
#variables
#functions
def react(key):
while True:
print('Press shift to start.')
kb.wait("shift")
time.sleep(random.uniform(0.5, 5))
print('uwu')
startcounter = time.monotonic()
kb.wait("shift")
endcounter = time.monotonic()
print('Reaction time is {:>9.4f}'.format(endcounter - startcounter))
time.sleep(0.5)
if(kb.is_pressed(key)):
print('Closing game. Thanks for playing.')
main()
#main
def main():
print('Choose the game:')
print('React')
s = input()
if (s == 'react' or s == 'React'):
react('ctrl')
main()