Make an api that checks the guess word for Wordle against the correct word ad return information
Fantastic news! We've Found the answer you've been seeking!
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- 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"); } }
Related Book For
International Marketing And Export Management
ISBN: 9781292016924
8th Edition
Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr
Posted Date: