In this project, you'll create the Wordle game. This is a single-player game where the player tries to guess a five-letter word within six attempts. After each guess, the letters are marked as correct, present, or absent based on the secret word. You'll create the layout of the game and handle the feedback mechanism for correct, present, or absent letters. To get started, please scroll down and look at the tasks listed below.
Resources: neetoCode with list of 600 words.
Things you need to know: Conditionals, Functions, HTML DOM Selection and Manipulation, Browser Events.
Create an array of words using the data set given in the resources.
Implement a function to select a random word from the array.
Use the selected word as the word to be guessed in the game.
Green for correct letters in the correct position.
Yellow for correct letters in the wrong position.
Gray for incorrect letters.
The user continues to make guesses.
The board updates with each guess, showing the progress and the hints for each guess.
The game reaches its final state either by the user guessing the word correctly or by using all the allowed attempts.
If the word is guessed correctly, a success message is displayed, and input is disabled.
If all attempts are used, a game over message is displayed along with the correct word, and input is disabled.
These are some of the other projects you can build.