Skip to content

Commit 91bca74

Browse files
committed
word building input fixed:
1 parent 7cdc45c commit 91bca74

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

games/Word-Building/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
def DataAdding(word):
77
file = open(WORDS_FILE, 'rb')
88
words = pickle.load(file)
9-
a = words[word[0]]
9+
a = words[word[0].lower()]
1010
a.append(word)
11-
b = word[0]
11+
b = word[0].lower()
1212
words[b] = a
1313
file.close()
1414

games/Word-Building/word_building.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def Main():
5454
used_words.add(user_word)
5555

5656
# Add user's word to the data if it's not already there
57-
if user_word not in data.words[user_word[0]]:
57+
if user_word not in data.words[user_word[0].lower()]:
5858
data.DataAdding(user_word)
5959
time.sleep(1)
6060

0 commit comments

Comments
 (0)