bug fix on max score
This commit is contained in:
@@ -260,7 +260,7 @@ legal_list = [
|
||||
"WORDS", "WORDY", "WORKS", "WORLD", "WORMS", "WORRY", "WORSE", "WORST", "WORTH", "WOULD", "WOUND", "WRACK",
|
||||
"WRAPS", "WRAPT", "WRATH", "WREAK", "WRECK", "WREST", "WRING", "WRIST", "WRITE", "WRITS", "WRONG", "WROTE",
|
||||
"WROTH", "YACHT", "YARDS", "YARNS", "YAWNS", "YEARN", "YEARS", "YEAST", "YELLS", "YELPS", "YIELD", "YOKED",
|
||||
"YOKES", "YOLKS", "YOUNG", "YOURS", "YOUTH", "ZEBRA", "ZONES", "COLOR", "CINCO",
|
||||
"YOKES", "YOLKS", "YOUNG", "YOURS", "YOUTH", "ZEBRA", "ZONES", "COLOR",
|
||||
]
|
||||
|
||||
expanded_list = [
|
||||
@@ -982,11 +982,6 @@ def list_of_valid_words(letters, words=legal_list):
|
||||
return legal_words
|
||||
|
||||
|
||||
def rearrange_words_by_uniqueness(words):
|
||||
unique = [word for word in words if len(word) == len(set(word))]
|
||||
duplicates = [word for word in words if len(word) != len(set(word))]
|
||||
return unique + duplicates, len(unique)
|
||||
|
||||
def capitalize_all_and_remove_duplicates(arr):
|
||||
for i,word in enumerate(arr):
|
||||
arr[i] = word.upper()
|
||||
@@ -1006,7 +1001,6 @@ def print_valid_words(letters=alphabet):
|
||||
legal_words = capitalize_all_and_remove_duplicates(legal_words)
|
||||
random.shuffle(legal_words)
|
||||
# Just in case the watch's random function is too pseudo, better to shuffle th elist so it's less likely to always have the same starting letter
|
||||
legal_words, num_uniq = rearrange_words_by_uniqueness(legal_words)
|
||||
|
||||
print("static const char _valid_letters[] = {", end='')
|
||||
for letter in letters[:-1]:
|
||||
@@ -1041,8 +1035,6 @@ def print_valid_words(letters=alphabet):
|
||||
i+=1
|
||||
print('')
|
||||
print("};")
|
||||
|
||||
print(f"\nstatic const uint16_t _num_unique_words = {num_uniq}; // The _legal_words array begins with this many words where each letter is different.")
|
||||
|
||||
|
||||
def get_sec_val_and_units(seconds):
|
||||
|
||||
Reference in New Issue
Block a user