Question: In this assignment you ll work on implementing the game Wordle . If you haven t played it , I suggest you try it out
In this assignment youll work on implementing the game Wordle If you havent played it I suggest you try it out a google search will help you find it so you know what to aim for.
Playing a game of wordle can be broken down into these steps:
The computer obtains a list of possible words
The computer selects one word as the "secret" which the player will try to guess
The player guesses a word
The computer generates a hint about which letters are correctincorrect
The hint is communicated to the player.
Guessing continues until the player is out of turns or wins the game.
The game is implemented in three classes: Wordle, Hint, and WordleGame. The Wordle class is responsible for items and above. Both the Wordle class and the Hint class are responsible for item The Wordle class must be part of providing a hint to the player since the Wordle class knows what the secret word is However, the logic for how to construct the hint itself, and the data associated with the details of the hint are encapsulated by the Hint class, so the Wordle class acts mainly as a middleman. The WordleGame class contains the logic for interacting between the computer and the player. That is it is a user of the Wordle and Hint classes. Specifically, the WordleGame starts steps and off by creating the Wordle object instance. The WordleGame allows a player to guess a word step by reading input from the keyboard, and then sends that to the computer ie the Wordle object instance to obtain a hint, which is then printed for the user step This game loop continues until no more guesses remain, or the game is won step
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
