Changed order of upper()
This commit is contained in:
4
game.py
4
game.py
@ -58,14 +58,14 @@ class Captcha:
|
|||||||
# anthing below this index should appear green.
|
# anthing below this index should appear green.
|
||||||
|
|
||||||
def addChar(self, char, font):
|
def addChar(self, char, font):
|
||||||
self.chars.append(char.upper())
|
self.chars.append(char)
|
||||||
self.fonts.append(font)
|
self.fonts.append(font)
|
||||||
|
|
||||||
def match(self, char):
|
def match(self, char):
|
||||||
if self.charIdx == len(self.chars):
|
if self.charIdx == len(self.chars):
|
||||||
return True, True
|
return True, True
|
||||||
|
|
||||||
matches = char.upper() == self.chars[self.charIdx]
|
matches = char.upper() == self.chars[self.charIdx].upper()
|
||||||
print(f'{char.upper()} == {self.chars[self.charIdx]}')
|
print(f'{char.upper()} == {self.chars[self.charIdx]}')
|
||||||
if matches:
|
if matches:
|
||||||
self.charIdx += 1
|
self.charIdx += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user