wordle icon indicating copy to clipboard operation
wordle copied to clipboard

Fix for Issue 69 duplicate letters bug

Open craig382 opened this issue 1 year ago • 0 comments

  • utils.ts\getRowData has a "duplicate letters bug" that returns false remaining solution(s) for the case where the tiles have revealed duplicate letters. This is the same bug as Mikha Davids' Wordle repository Issue #69 titled "Potential answer / guess count displayed 0 for 'Dolly' ".
  • To replicate the "duplicate letters bug", revert the following code in the utils.ts\getRowData function from "if (occurrences < e[1][0]) {" to "if (!occurrences || (e[1][1] && occurrences !== e[1][0])) {". Then, play any of the games below with and without the reverted change, double click the row after the suggested guess and Board.svelt\context will log out pAnsWords (the list of remaining solutions) to the Console tab of the browser's Development tools panel.
  • http://localhost:5173/wordle/#infinite/43873602 dolly, try guess "lolly" or "lowly" after guesses "slate" and "broil". Reference Mikha Davids' Wordle repository Issue #69 titled "Potential answer / guess count displayed 0 for 'Dolly' ".
  • http://localhost:5173/wordle/#infinite/63769522 beefy, try guess "greed" after guess "slate".
  • http://localhost:5173/wordle/#infinite/63781582 gloom, try guess "boozy" after guess "trace".
  • Board.svelte\context calls utils.ts\getRowData to filter utils.ts\words.words to pAnsWords list of remaining solutions.
  • Mikha, thank you so much for the great work you did in Wordle+, and for sharing it / making it open source.
  • Mikha, in order to understand your code better and to help me find the bug, I renamed a variable or two and added some comments and console logging. You may not want to keep some of these "cosmetic" changes.

craig382 avatar Feb 01 '24 15:02 craig382