285784950720d514e3eb94d8c4f295df247ab1cc — ccejbc 6 years ago 090e23b
get_words() now gives yo words from words.txt
1 files changed, 9 insertions(+), 3 deletions(-)

M hangman.py
M hangman.py => hangman.py +9 -3
@@ 9,10 9,16 @@ def find_all(s, ch):

def get_words():
    '''Return a list of words for user to guess
        At the moment it's just a set list,
        but in future I will get words from the dictionary
       from user input or from words.txt
    return ["test","abracadabra", "guitar"]
    word_source = ""
    while word_source not in ["m", "p"]:
        word_source = input("Do you want to enter a list of words manually (m) or use preset words (p)?\n    Please enter 'm' or 'p': ")
    if word_source == "p":
        return open("words.txt").read().splitlines()
        print("not working at the moment so i'll give you some presets")
        return open("words.txt").read().splitlines()

def new_word():