This is a simple console-based implementation of the popular word puzzle game Wordle, written in C++.
- Clone the Repository: Clone this repository to your local machine using the following command:
git clone <repository_url>
- Compile the Code: Compile the
main.cppfile using any C++ compiler. For example:
g++ main.cpp -o wordle
- Run the Game: Execute the compiled binary file to start the game.
./wordle
-
Choose Difficulty Level: Select a difficulty level - Beginner, Intermediate, or Expert.
-
Guess the Word: Try to guess the hidden word within the specified number of attempts. Enter your guesses one by one.
-
Feedback: After each guess, you'll receive feedback in the form of colored squares:
- Green: Correct letter in the correct position.
- Yellow: Correct letter in the wrong position.
- Gray: Incorrect letter.
- Win or Lose: If you guess the word correctly within the allowed attempts, you win! Otherwise, you lose.
- Three difficulty levels: Beginner (4-letter word), Intermediate (5-letter word), and Expert (6-letter word).
- Randomly selects words from a dictionary file based on the chosen difficulty level.
- User-friendly interface with colored feedback for guesses.
- The dictionary files for each difficulty level are stored in the
Dictionarydirectory. Each file contains words corresponding to a specific alphabet. For example,A.txtcontains words starting with the letter 'A'. - To display feedback for guesses, the game utilizes background colors:
- Green background indicates a correct letter in the correct position.
- Red and green background indicates a correct letter in the wrong position.
- Red background indicates an incorrect letter.
🎮 Do have a look at the original version of this game at New York Times.
Feel free to customize and expand upon this README as needed. Happy gaming! If you need any further assistance or have any questions, feel free to ask.