Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Wordle) Does current version of simulations.py account for the double-lettering problem discussed in the 2nd video? #44

Open
lucaguarro opened this issue Mar 2, 2022 · 1 comment

Comments

@lucaguarro
Copy link

lucaguarro commented Mar 2, 2022

commit 63861f8eeae702ac80a156cf9c75e090337daaa2 "Fix double-letter coloring" claims to have handled the issue with edits in the wordle.py file. Assuming that simulations.py is the new name for the file, I no longer see those changes from that commit in the current version of the file.

I just want to make sure that simulations.py plays the game the "wordle" way of playing it. Can I use the code without worrying about this error?

@lucaguarro
Copy link
Author

lucaguarro commented Mar 2, 2022

Okay looking through the current code, I believe this segment of code in the function "def generate_pattern_matrix(words1, words2)" takes care of that problem as insinuated by the comment.

def generate_pattern_matrix(words1, words2)
    ...    
    for k in range(nl):
            # If it's a match, mark all elements associated with
            # that letter, both from the guess and answer, as covered.
            # That way, it won't trigger the yellow pass.
            equality_grid[:, :, k, i].flat[matches] = False
            equality_grid[:, :, i, k].flat[matches] = False
    ...

That should put my worries at ease. If anyone could confirm that would be great.

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

No branches or pull requests

1 participant