@@ -33,7 +33,7 @@ def on_release(key):
33
33
34
34
# Get the status of the letters in the wordle
35
35
def get_row_results (game_row ):
36
- tiles = game_row .find_elements (By .CLASS_NAME , "Tile-module_tile__3ayIZ " )
36
+ tiles = game_row .find_elements (By .CLASS_NAME , "Tile-module_tile__UWEHN " )
37
37
row_results = []
38
38
res_to_int = {
39
39
"correct" : 1 ,
@@ -102,6 +102,8 @@ def solving_algorithm(res, finder):
102
102
print (f"Letter { word [letter ]} is correct" )
103
103
finder .word [letter ] = word [letter ]
104
104
print (finder .word )
105
+ if word [letter ] in finder .absent_letters :
106
+ finder .absent_letters .remove (word [letter ])
105
107
106
108
elif res [letter ] == 0 : # Case when the status of the letter is "present" (present but at the wrong position)
107
109
print (f"Letter { word [letter ]} is present" )
@@ -114,10 +116,10 @@ def solving_algorithm(res, finder):
114
116
print (f"Letter { word [letter ]} is absent" )
115
117
if word [letter ] not in finder .present_letters :
116
118
finder .absent_letters .add (word [letter ])
117
- else :
118
- # We keep all the words that don't match the pattern of the word entered
119
- finder .possible_words = list (
120
- filter (lambda x_word : not check_match (word [letter ], x_word [letter ]), finder .possible_words ))
119
+
120
+ # We keep all the words that don't match the pattern of the word entered
121
+ finder .possible_words = list (
122
+ filter (lambda x_word : not check_match (word [letter ], x_word [letter ]), finder .possible_words ))
121
123
122
124
print ("\n " )
123
125
print ("Updating list of possible words ..." )
@@ -139,10 +141,10 @@ def solving_algorithm(res, finder):
139
141
140
142
print ("List of possible words updated !\n " )
141
143
142
- print ("letter not in the right position : " , finder .present_letters )
143
- print ("Letters with absent status" , finder .absent_letters )
144
- print ("list of words : " , finder .possible_words )
145
- print ("length of list" , len (finder .possible_words ))
144
+ print ("Letter not in the right position : " , finder .present_letters )
145
+ print ("Letters with absent status : " , finder .absent_letters )
146
+ print ("List of words : " , finder .possible_words )
147
+ print ("Length of list" , len (finder .possible_words ))
146
148
147
149
148
150
def main ():
@@ -165,7 +167,7 @@ def main():
165
167
time .sleep (1 )
166
168
167
169
# Get the game rows
168
- game_rows = browser .find_elements (By .CLASS_NAME , 'Row-module_row__dEHfN ' )
170
+ game_rows = browser .find_elements (By .CLASS_NAME , 'Row-module_row__pwpBq ' )
169
171
170
172
# Enter words until the game is over or the wordle is solved
171
173
for i in range (guesses_left , 0 , - 1 ):
0 commit comments