calculate average guesses and fix divide by 0 bug #4

Merged
adam merged 0 commits from refs/pull/4/head into main 2025-02-16 17:12:31 +00:00
adam commented 2025-02-16 17:11:04 +00:00 (Migrated from gitea.adbraun.lol)

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
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
adam/wordle!4
No description provided.