Improve Chip Distribution (Issue #40) #55
No reviewers
Labels
No Label
Large
Medium
Small
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: david/poker-chips-helper#55
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "djwesty/40"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The goal with this work is to better distribute the chips as in issue #40 . This was done primarily by using a fibbonacci approach in the distribution algorithm.
Minor improvements were also made to denominating the chips.
Over all, the result is pretty good. However, there are still expected edge cases where the total value does not match, so we highlight this with a warning. A more sophisticated denomination algorithm could improve this in the future.
I also bounded the buy-in selector to reduce these edge cases and fixed tests accordingly.
There was also an issue with float point comparison in typescript, solved via rounding.
Improved chip distribution using the Fibonacci approach, reducing imbalances. Edge cases are handled with warnings, and fixes for buy-in bounding and floating-point comparison improve reliability. Nice work!