cs50 / problems

Checks for check50
134 stars 227 forks source link

New check for pset 2 - Wordle. Resolves #192 #213

Closed RemArcAble08 closed 7 months ago

RemArcAble08 commented 8 months ago

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.

https://github.com/cs50/problems/issues/192