Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deck: completed function to create and shuffle a UNO card deck. #29

Closed

Conversation

sethdivyansh
Copy link
Contributor

Fixes: #1

Description

  1. added black as a color in CardColor in types.d.ts
  2. separated the values of special cards and wild cards into two arrays named specialValues and wildCardValues, respectively.
  3. Iterates over each color in the colors array.
    For each color:
    • Iterates over each number value (0 to 9) in the numValues array and adds two cards of that color for each number, except for '0' where only one card is added.
    • Iterates over each special value in the specialValues array and adds two cards of that color for each special value.
    • If the color is 'black', iterates over each wild card value in the wildCardValue array and adds four cards of that color for each wild card value.

Checklist

  • I have tested these changes locally.
  • I have reviewed the code and ensured it follows the project's coding guidelines.
  • I have updated the documentation, if necessary.
  • I have assigned reviewers to this pull request.

@sethdivyansh sethdivyansh deleted the fix/issue-#2 branch May 31, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the Card array generation logic
1 participant