calculate average guesses and fix divide by 0 bug #4

Merged
adam merged 1 commits from feature/averages into main 2025-02-16 17:12:31 +00:00
Owner

Changes

  • Remove some unused variables
  • Fix bug where if a new user failed their first daily wordle stats were not rendered due to a divide by 0 bug bar_length=$(( value * max_width / highest ))
  • calculate user average guesses taken for wins
    • bash does not work with floating point numbers with arithmetic
    • numerator is multiplied by 100 and then integer and decimal components are calculated seperately
### Changes - Remove some unused variables - Fix bug where if a new user failed their first daily wordle stats were not rendered due to a divide by 0 bug ```bar_length=$(( value * max_width / highest ))``` - calculate user average guesses taken for wins * bash does not work with floating point numbers with arithmetic * numerator is multiplied by 100 and then integer and decimal components are calculated seperately
adam added 1 commit 2025-02-16 17:11:04 +00:00
calculate average guesses and fix divide by 0 bug
Deploy game to server / deploy (push) Successful in 8s
357c74cf08
adam marked the pull request as work in progress 2025-02-16 17:11:41 +00:00
adam marked the pull request as ready for review 2025-02-16 17:11:47 +00:00
adam merged commit 357c74cf08 into main 2025-02-16 17:12:31 +00:00
adam deleted branch feature/averages 2025-02-16 17:12:31 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/wordle#4