Implemented ChipDistributionSummary & ChipDistributionSummary tests #17
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#17
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "MantashaNoyela/5"
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?
This PR introduces the ChipDistributionSummary component, which dynamically distributes poker chips among players based on the buy-in amount and total available chips. It ensures fair allocation by:
Scaling down chips if they exceed MAX_CHIPS (default: 500).
Equally distributing chips per player.
Optimizing performance using React hooks (useState, useEffect, useMemo).
If no valid distribution exists, it displays a fallback message. This update improves chip allocation accuracy and UI responsiveness.
Nice work Mantasha. Code and tests look solid - good use of hooks