Question: Make an api that checks the guess word for Wordle against the correct word ad return information for each letter of the guess word. green-
Make an api that checks the guess word for Wordle against the correct word ad return information for each letter of the guess word.
green- correct letter in the correct position
yellow- correct letter
grey/gray - incorrect letter
inputs: correct word, guess word (both strings)
output: green, yellow or grey.gray for each letter of the guess
oxide(correct word)/short( guess word)= GREY, GREY,YELLOW,GREY,GREY
public class Problem3 { public enum Result {GREEN, YELLOW, GREY} private String correctWord; Problem3(string correctWord){ this.correctWord = correctWord; } public Result[] check (String guess){ } public static void main (String[] args){ Problem3 solution = new Problem3("OXIDE"); Result[] result = solution.check("SHORT"); } }
Step by Step Solution
3.36 Rating (149 Votes )
There are 3 Steps involved in it
Heres an implementation of the Problem3 class that checks the guess word against the correct word in ... View full answer
Get step-by-step solutions from verified subject matter experts
