I'm new to stackoverflow and currently on week 2 of learning coding. I'm looking for some guidance as I am creating a basic JavaScript game whereby the user has to guess the title of the movie using a group of scrambled letters.
As you can see in the image, the Shuffled(scrambled) Letters div at the bottom, consists of the movie title, shuffled amongst other letters. I'd like there to be 13 letters to choose from with eg. 'Star Wars' scrambled amongst other random letters. I would like the letter to hide on click and show itself in the Movie Title div above. When the letters are in the correct order and spell out the correct title, the player moves on to the next word.
I'm not sure if I'm on the right track.
var Movie1 = 'Star Wars' (each letter being in an array maybe?)
~title.letter[] = display.none
if (letter == title.letter[]) {
return title.letter[] == display.true;
}
// I suppose I'd need to create an array of random letters that will be added to the array of the shuffled movie title, so that it totals 13 letters for every question.
// Then perhaps add fisher-yates shuffle algorithm to each movie?