Skip to content

Conversation

@danshea00
Copy link

The current logic in wordle_server.c is incorrect. If a misplaced letter keeps appearing more than the number of times it has appeared in the target word, it should not keep showing as yellow.

Example 1:

word:     hello
guess:    eeeee
output:   YGYYY
correct:  XGXXX

Example 2:

word:     hello
guess:    lelel
output:   YGGYY
correct:  YGGXX

Where Y is yellow, G is green, and X is grey.

Concerns are:

  • It might be confusing to have to call the calculate_states function then pack MRs using the states global
  • Not sure if static alphabet sized array and lines like counts[word[i] - 'a']++ is clear enough

@Ivan-Velickovic
Copy link
Collaborator

This is the first non-trivial change to the code since the release of the tutorial, which means it's a good test for the CI that I will setup soon. So I'll leave this PR open until that's done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants