-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deck: completed function to create and shuffle a UNO card deck.
- added black as a color in CardColor in types.d.ts - separated the values of special cards and wild cards into two arrays named specialValues and wildCardValues, respectively. - 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.
- Loading branch information
1 parent
f05595c
commit 25181d0
Showing
2 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters