Wordle

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.

Max Chat
Max Chat

Task 1

Apply the background and add the heading.

Task 2

Create a basic Grid Structure and Input Section.

Task 3

Initialize the game with a random word.
  • 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.

Task 4

Display the game state after the first incorrect guess.
  • Green for correct letters in the correct position.

  • Yellow for correct letters in the wrong position.

  • Gray for incorrect letters.

Task 5

Display the game state after a few more guesses.
  • The user continues to make guesses.

  • The board updates with each guess, showing the progress and the hints for each guess.

Task 6

Display the final game state when the word is guessed correctly or when maximum attempts are reached.
  • 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.

More Projects

These are some of the other projects you can build.