-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdictionary.py
More file actions
28 lines (19 loc) · 649 Bytes
/
dictionary.py
File metadata and controls
28 lines (19 loc) · 649 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'''
This file gives fully cached access to the dictionary words.
Note that dictionaries that change on disk will be reloaded automatically.
'''
from pathlib import Path
solution_words = Path('data/solution_words.txt').read_text().splitlines()
accepted_words = Path('data/accepted_words.txt').read_text().splitlines()
def get_alphabet() -> str:
return 'abcdefghijklmnopqrstuvwxyz'
def get_solution_words() -> list[str]:
'''
Get the solution words.
'''
return solution_words
def get_acceptable_words() -> list[str]:
'''
Get the acceptable guess words.
'''
return accepted_words