@@ -110,17 +110,13 @@ def solving_algorithm(word, res):
110
110
111
111
for absent in absent_letters :
112
112
print (absent )
113
- list_of_words = list (filter (check_letter_in_word (absent , list_of_words ), list_of_words ))
114
-
115
- list_of_words = buffer_list
116
-
117
-
113
+ list_of_words = list (filter (check_letter_in_word (absent ), list_of_words ))
118
114
119
115
print ("letter not in the right position : " , present_letters )
120
116
print ("Letters with absent status" , absent_letters )
121
117
print ("solving string :" , solving_string )
122
118
# print(list_of_words)
123
- print ("lenght of list" , len (buffer_list ))
119
+ print ("length of list" , len (list_of_words ))
124
120
125
121
126
122
def main ():
@@ -129,17 +125,21 @@ def main():
129
125
browser .get ("https://www.nytimes.com/games/wordle/index.html" )
130
126
131
127
# Wait for start
132
- with keyboard .Listener (on_release = on_release ) as listener :
128
+ with keyboard .Listener (on_release = on_release , suppress = True ) as listener :
129
+ print ("Starting" )
133
130
listener .join ()
134
- print ("Starting" )
131
+
132
+ # With "suppress=True", duplicate key presses are not sent to the application
133
+ # but for some reason I need to add a delay for the first input to be sent.
134
+ time .sleep (1 )
135
135
136
136
# Get the game rows
137
137
game_rows = browser .find_elements (By .CLASS_NAME , 'Row-module_row__dEHfN' )
138
138
139
139
first_string = "tests"
140
140
enter_word (first_string )
141
141
res = get_row_results (game_rows [0 ])
142
- solving_algorithm (first_string , res )
142
+ # solving_algorithm(first_string, res)
143
143
144
144
time .sleep (1 )
145
145
0 commit comments