Wordle, letter-by-letter word guessing game. Come up with words that of the same length, 6 letters long. Put these set o
Posted: Fri Jul 01, 2022 5:41 am
Wordle, letter-by-letter word guessing game.
Come up with words that of the same length, 6 letters long.
Put these set of words in one array or vector. Pick an answerword, then let the user
guess the letters in the word. After each guess, show status foreach guessed letter:
1) letter is in the word and is in the correct place
2) letter is in the word and is NOT in the correct place
3) letter is NOT in the word
The user enters guessed words until the guessed word is matchesthe answer word.
Implementation Requirements:
1) Use one or more classes; with 1 or more of each:constructors, setters, getters
2) Use one or more enums (avoid magic numbers)
Eg: {Match, PartMatch, NoMatch}; {Start, Run, Quit}; {Place,Show, Absent}; {Red, Green, Yellow};
3) Use one or more arrays or vectors to store multiple guesses,multiple words.
4) Good user interface: self-documenting, no infinite loops.
User should be able to quit without getting stuck in game.
5) Provide a score at the end.
Variations:
1) Length of word, should be: 6
2) Number of words to offer to user, 7 words
3) How to handle user input if word guess is NOT same length asanswer word
4) How easy or difficult, hints (for testing purposes, nice toknow answer to verify status)
5) How to quit early (q to quit word, Q to quit entire game)
6) How to display status of guess word (numbers, symbols,colored letters)
Must use a programmer-defined class for this lab, withconstructors, setters and getters! You can calculate and return thestate of the Wordle using public member functions of classWordle
Show status with numbers, letters, colored letters
Sample output - please code to produce thisoutput
Welcome to Wordle!
Guess a word, letter by letter. Check statusfor:
correct letter and position; correct letter but wrongposition; letter not in word.
Here are the words to choose from:
change, qwerty, frenzy
Guess this word #1: change
(q:quit this word; Q:Quit entire game.)
Guess 6 letters: hencfag
Guess #1 hencfag status: 0 6 1 ????X??hencfag
Guess 6 letters: cahneg
Guess #2 cahneg status: 2 4 0 !??!?? cahneg
Guess 6 letters: change
Guess #3 change status: 6 0 0 !!!!!! change
___________
Guess this word #2: qwerty
(q:quit this word; Q:Quit entire game.)
Guess 6 letters: uiogfw
Guess #1 uiogfw status: 0 1 5 XXXXX? uiogfw
Guess 6 letters: werqty
Guess #2 werqty status: 2 4 0 ????!! werqty
Guess 6 letters: qwerty
Guess #3 qwerty status: 6 0 0 !!!!!! qwerty
___________
Guess this word #3: frenzy
(q:quit this word; Q:Quit entire game.)
Guess 6 letters: Q
___________
Final score: 2 of 2 - 100.00%
Goodbye!
___________
Start out by displaying a short intro with brief instructions toplay the game Wordle. Ask for the first guess. Determine the statusof the guess (3 numbers are OK) and display it. Let the user guessseveral times. Allow the player to stop the game immediatelywithout guessing the word.
In addition to Basic, keep score. How many guesses were neededto get the word? How many correctly guessed? Handle score correctlyif user quits early. If user quits early and does not make a guesson a word, do not mark that missed word against the user.
Play several games using different words. Keep score of how manywords the user guessed correctly. Provide percentage of wordsguessed correctly, words presented, percentage correct.
Provide status that shows symbols for each letter position basedon the guess. The status symbols indicate whether the letter isplaced correctly; present but in wrong place, or absent from theword.
Use different colors of characters to indicate whether theletter is placed correctly; present but in wrong place, or absentfrom the word. Use an enumerated type to name the colors and avoid"magic numbers".
Please do everything mentioned above, please use classesand objects. Thank you.
Come up with words that of the same length, 6 letters long.
Put these set of words in one array or vector. Pick an answerword, then let the user
guess the letters in the word. After each guess, show status foreach guessed letter:
1) letter is in the word and is in the correct place
2) letter is in the word and is NOT in the correct place
3) letter is NOT in the word
The user enters guessed words until the guessed word is matchesthe answer word.
Implementation Requirements:
1) Use one or more classes; with 1 or more of each:constructors, setters, getters
2) Use one or more enums (avoid magic numbers)
Eg: {Match, PartMatch, NoMatch}; {Start, Run, Quit}; {Place,Show, Absent}; {Red, Green, Yellow};
3) Use one or more arrays or vectors to store multiple guesses,multiple words.
4) Good user interface: self-documenting, no infinite loops.
User should be able to quit without getting stuck in game.
5) Provide a score at the end.
Variations:
1) Length of word, should be: 6
2) Number of words to offer to user, 7 words
3) How to handle user input if word guess is NOT same length asanswer word
4) How easy or difficult, hints (for testing purposes, nice toknow answer to verify status)
5) How to quit early (q to quit word, Q to quit entire game)
6) How to display status of guess word (numbers, symbols,colored letters)
Must use a programmer-defined class for this lab, withconstructors, setters and getters! You can calculate and return thestate of the Wordle using public member functions of classWordle
Show status with numbers, letters, colored letters
Sample output - please code to produce thisoutput
Welcome to Wordle!
Guess a word, letter by letter. Check statusfor:
correct letter and position; correct letter but wrongposition; letter not in word.
Here are the words to choose from:
change, qwerty, frenzy
Guess this word #1: change
(q:quit this word; Q:Quit entire game.)
Guess 6 letters: hencfag
Guess #1 hencfag status: 0 6 1 ????X??hencfag
Guess 6 letters: cahneg
Guess #2 cahneg status: 2 4 0 !??!?? cahneg
Guess 6 letters: change
Guess #3 change status: 6 0 0 !!!!!! change
___________
Guess this word #2: qwerty
(q:quit this word; Q:Quit entire game.)
Guess 6 letters: uiogfw
Guess #1 uiogfw status: 0 1 5 XXXXX? uiogfw
Guess 6 letters: werqty
Guess #2 werqty status: 2 4 0 ????!! werqty
Guess 6 letters: qwerty
Guess #3 qwerty status: 6 0 0 !!!!!! qwerty
___________
Guess this word #3: frenzy
(q:quit this word; Q:Quit entire game.)
Guess 6 letters: Q
___________
Final score: 2 of 2 - 100.00%
Goodbye!
___________
Start out by displaying a short intro with brief instructions toplay the game Wordle. Ask for the first guess. Determine the statusof the guess (3 numbers are OK) and display it. Let the user guessseveral times. Allow the player to stop the game immediatelywithout guessing the word.
In addition to Basic, keep score. How many guesses were neededto get the word? How many correctly guessed? Handle score correctlyif user quits early. If user quits early and does not make a guesson a word, do not mark that missed word against the user.
Play several games using different words. Keep score of how manywords the user guessed correctly. Provide percentage of wordsguessed correctly, words presented, percentage correct.
Provide status that shows symbols for each letter position basedon the guess. The status symbols indicate whether the letter isplaced correctly; present but in wrong place, or absent from theword.
Use different colors of characters to indicate whether theletter is placed correctly; present but in wrong place, or absentfrom the word. Use an enumerated type to name the colors and avoid"magic numbers".
Please do everything mentioned above, please use classesand objects. Thank you.