D. Final Algorithm, Flowchart, or Pseudocode

First Draft of Pseudocode

This was a rough outline of how Mark designed Hangman to start.

 

Mark Niemann

words = load(dictionary.txt);

dif = input('Choose a difficulty')
while(dif is not: easy, normal, hard) {
     dif = input(Choose a difficulty:);
}

if (dif = 'easy') {
     wrd = words(random)
     while(length(wrd) > 5) 
elseif (dif = 'normal')
     while(length(wrd) > 7 || length(wrd)
else(dif = 'hard')

lettersGuessed = [];

 

This outlines how the hardest parts of the broad code work. Changing difficulty is where the game stems from and after that it is just a series of inputs and prints to interact with the game player, because the game reprints the entire display of the blanks and letters.