choose a random word from the list
Set the number of tries to 0
Reset the array that monitors the variables to 0
Print the program title , messages
Print the number of
chances left
Set the counter that
monitors the number of occurrences of the letter pressed in word
to 0
Use a loop
Set variable
foundletter to 0
Wait for user to press
a letter
Change the letter
pressed to uppercase
Check the key pressed
If a letter has not
been pressed yet
Check whether the
letter is found in the word
if so
increment counter
by 1
Display letter on
screen
Set variable
foundletter to TRUE
end if
If not found
increment
variable numberoftries by 1
Display number of
chances left
Set the array that monitors the variables to
-1
end if
loop until escape key is pressed or word found or no more chances
left
Say whether user has won or lost
Ask if user want to play again