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

new test for wordle (#192) / update sort_pairs tideman (#172) #230

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

RemArcAble08
Copy link
Contributor

Same commits from 2023/x now on 2024/x.

Wordle:
This check ensures the proper iteration implementation of check_word. Incorrectly looping through the choice rather than the guess could cause the program to miss the second letter.

This is clear when comparing the guess 'grass' to the choice 'joust.' When you loop through joust, the code finds an exact match between the 4th letter and breaks. However, the code never compared the 4th letter of 'joust' to the 5th letter of 'grass,' which should have been a close match, but instead gets labeled as wrong.

In addition, the current implementation of scoring is flawed and needs to be changed. If done, the check 'links' can be changed to the check 'sinks' for thoroughness.

Tideman:
Now, starts the unsorted array of pairs in the worst case scenario. Previously, just one swap would have correctly sorted the pairs, meaning many faulty sorting implementations could "accidentally" get the right answer.

@rongxin-liu
Copy link
Contributor

rongxin-liu commented Feb 6, 2024

#172
#192

@rongxin-liu rongxin-liu added CS50x CS50x enhancement New feature or request labels Feb 6, 2024
@rongxin-liu rongxin-liu self-assigned this Feb 6, 2024
@rongxin-liu
Copy link
Contributor

Thank you!

@rongxin-liu rongxin-liu merged commit 27530ec into cs50:2024/x Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CS50x CS50x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants