Colocada: Ter, 16 Mai 2017 - 7:31 Assunto: Assign each letter to a variable
Hi everyone, I'm back after I got sucked into my exams and preparations
I would like you to help me out making a hanger game (if that's what it's called) where you basically try to guess a word and for every wrong letter a part of a stickman is drawn until you get a hanged stickman.
What I see in my head is a premade list of a 1000 words not more than 6 characters long
The program will first choose a random word out of those 1000 words and then show how many characters it's made of using underscores (_)
e.g: apple will be displayed as _ _ _ _ _
next, the program should scan the word to see what is the word made of and store every letter into a variable, let's say x1=a x2=p x3=p x4=l x5=e
then the program will prompt the user to input a letter, then it will check if the input == any of the variables
if it does than it should replace the _ with the letter, if it doesn't it will give you a strike that will add up in your strike-meter (maybe it will add an X until it reaches 5)
I didn't find the right solution from the internet.