Implemented ChipDistributionSummary & ChipDistributionSummary tests #17

Merged
MantashaNoyela merged 1 commits from MantashaNoyela/5 into main 2025-02-11 16:16:06 -08:00
MantashaNoyela commented 2025-02-11 13:57:45 -08:00 (Migrated from github.com)

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.

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.
Vutukuri15 (Migrated from github.com) reviewed 2025-02-11 13:57:45 -08:00
djwesty (Migrated from github.com) approved these changes 2025-02-11 14:56:32 -08:00
djwesty (Migrated from github.com) left a comment

Nice work Mantasha. Code and tests look solid - good use of hooks

Nice work Mantasha. Code and tests look solid - good use of hooks
Sign in to join this conversation.
No description provided.