File tree 3 files changed +28
-46
lines changed
3 files changed +28
-46
lines changed Original file line number Diff line number Diff line change 1
-
2
- #Code to play games, text ppl, etc.
3
-
4
1
import keyboard
5
2
import random
6
3
import time
4
+ import sys
5
+
6
+ print ('Press Space to begin' )
7
+ keyboard .wait ("space" )
8
+
9
+ while (True ):
10
+ if keyboard .is_pressed ('Esc' ):
11
+ print ("Exiting..." )
12
+ sys .exit (0 )
7
13
8
- exit = False
9
- print ('3' )
10
- time .sleep (1 )
11
- print ('2' )
12
- time .sleep (1 )
13
- print ('1' )
14
- time .sleep (1 )
15
- while (exit == False ):
16
14
# Generate Int for Decision Making
17
15
randInt = random .randint (0 , 181 )
18
16
# Lowercase Letter Inputs
62
60
time .sleep (0.1 )
63
61
keyboard .release ('enter' )
64
62
time .sleep (0.01 )
65
-
66
- exit = keyboard .is_pressed ('esc' )
Original file line number Diff line number Diff line change 1
-
2
- #Code to play games, text ppl, etc.
3
-
4
1
import keyboard
5
2
import random
6
3
import time
4
+ import sys
5
+
6
+ print ('Press Space to begin' )
7
+ keyboard .wait ("space" )
8
+
9
+ while (True ):
10
+ if keyboard .is_pressed ('Esc' ):
11
+ print ("Exiting..." )
12
+ sys .exit (0 )
7
13
8
- exit = False
9
- print ('3' )
10
- time .sleep (1 )
11
- print ('2' )
12
- time .sleep (1 )
13
- print ('1' )
14
- time .sleep (1 )
15
- while (exit == False ):
16
14
randInt = random .randint (0 , 360 )
17
15
if (randInt < 100 ):
18
16
keyboard .press ('z' )
43
41
time .sleep (0.2 )
44
42
keyboard .release ('enter' )
45
43
time .sleep (0.01 )
46
-
47
- exit = keyboard .is_pressed ('esc' )
Original file line number Diff line number Diff line change 1
-
2
- #Code to play games, text ppl, etc.
3
-
4
1
import keyboard
5
2
import random
6
3
import time
4
+ import sys
7
5
8
6
def release_all ():
9
7
keyboard .release ('i' )
@@ -16,19 +14,15 @@ def release_all():
16
14
keyboard .release ('a' )
17
15
keyboard .release ('space' )
18
16
19
- exit = False
20
- print ('5' )
21
- time .sleep (1 )
22
- print ('4' )
23
- time .sleep (1 )
24
- print ('3' )
25
- time .sleep (1 )
26
- print ('2' )
27
- time .sleep (1 )
28
- print ('1' )
29
- time .sleep (1 )
30
- while (exit == False ):
31
-
17
+ print ('Press Space to begin' )
18
+ keyboard .wait ("space" )
19
+
20
+ while (True ):
21
+ if keyboard .is_pressed ('Esc' ):
22
+ print ("Exiting..." )
23
+ release_all ()
24
+ sys .exit (0 )
25
+
32
26
# First key press
33
27
randInt = random .randint (0 , 100 )
34
28
if (randInt < 10 ):
@@ -74,7 +68,3 @@ def release_all():
74
68
time .sleep (0.1 )
75
69
76
70
release_all ()
77
-
78
- exit = keyboard .is_pressed ('esc' )
79
-
80
- release_all ()
You can’t perform that action at this time.
0 commit comments