Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

FR: Show guess distribution record, like real Wordle #52

Open
joeyparrish opened this issue Apr 5, 2022 · 1 comment
Open

FR: Show guess distribution record, like real Wordle #52

joeyparrish opened this issue Apr 5, 2022 · 1 comment

Comments

@joeyparrish
Copy link
Contributor

The archive could show the player's guess distribution, like real Wordle does:

Example:

Screenshot of Wordle guess distribution

@joeyparrish
Copy link
Contributor Author

Here's a quick and dirty histogram I pulled together in the JS console. I haven't spent enough time in the source yet to integrate it:

gameStates = JSON.parse(localStorage.gameStateList);
// 0-based - "0" means "1 guess", etc
numGuesses = gameStates
    .filter(game => game.state == 'won')
    .map(game => game.board.map(letters => letters.join(''))
    .findLastIndex(word => !!word));
distribution = [0, 0, 0, 0, 0, 0];
numGuesses.forEach(score => distribution[score] += 1);
distribution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant