Improve Chip Distribution (Issue #40) #55

Merged
djwesty merged 9 commits from djwesty/40 into main 2025-03-09 17:55:23 -07:00
djwesty commented 2025-03-09 16:35:34 -07:00 (Migrated from github.com)

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.

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.
MantashaNoyela (Migrated from github.com) reviewed 2025-03-09 16:35:34 -07:00
Vutukuri15 (Migrated from github.com) approved these changes 2025-03-09 17:46:16 -07:00
Vutukuri15 (Migrated from github.com) left a comment

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!

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!
Sign in to join this conversation.
No description provided.