Skip to content
Rick Umali edited this page Feb 24, 2023 · 1 revision

This Wiki contains notes about the design of this version of Wordle.

Initial Algorithm

Input: 5-letter guess word, 5-letter correct word

Assert: every letter in guess has inWord=false, inCorrectSpot=false

for every position/letter in guess
  is guess position/letter same as correct position/letter?
    YES: 
      1) mark guess position/letter inWord=true, inCorrectSpot=true
      2) remove matching correct letter from array of correct letters
    NO: do nothing

using array of correct letters, possibly modified by above
for every position/letter in guess that is inCorrectSpot=false
  is guess in array of correct letters
    YES:
      1) mark guess position/letter inWord=true
      2) remove matching correct letter from array of correct letters
    NO: do nothing
Clone this wiki locally