I have the following question for help writing a C++ program allowing users to play the game Wordle. I have played it after searching and I am still having trouble with this assignment. Any help will be appreciated. Thank You.
If you are not familiar with Wordle, search for Wordle and play the game to get a feel for how it plays.
I need help writing a program that allows the user to play Wordle with the following requirements:
The program should pick a random 5-letter word from the words.txt file and allow the user to make six guesses. If the user guesses the word correctly on the first try, let the user know they won. If they guess the correct position for one or more letters of the word, show them what letters and positions they guessed correctly. For example, if the word is “askew” and they guess “allow”, the game responds with:
a???w
If on the second guess, the user guesses a letter correctly but the letter is out of place, show them this by putting the letter under their guess:
a???w
s e
This lets the user know they guessed the letters s and e correctly but their position is out of place.
If the user doesn’t guess the word after six guesses, let them know what the word is.
I need help making a function to generate the random word as well as functions to check the word for correct letter guesses and for displaying the partial words as the user makes guesses. There is no correct number of functions but it should have at least three to four functions in the program.