Hi Community members,
A solution to last week’s challenge can be found here.
This challenge was submitted by Guilherme Dias, @3I_ATLAS . Thank you, Guilherme, for your submission!
This challenge is designed to test your advanced Alteryx Designer skills, particularly in app development, data manipulation, and logic handling.
You've just landed a high-profile client who operates a casino, and they’re curious to see how Alteryx stacks up against a human dealer. Your task is to build an Alteryx Analytic App that simulates card dealing in a casino setting.
You’ll be provided with two datasets:
- One containing suit symbols and names
- One containing card values (2–10, J, Q, K, A)
You recently got a new high-profile client who runs a casino. They want to run some simulations to see how Alteryx would compare against a human dealer. This is a APP-based challenge where you can test your more advanced skills in Alteryx Designer.
Your first dataset contains the suit and suite names, and you second dataset contain the card values (2-10, J, Q, K, A).
Task 1: Build the Full Deck
Using the two datasets, generate a complete standard deck of 52 playing cards by combining all card values with each of the four suits.
Task 2: Develop an Alteryx App that:
- Randomly shuffles the deck.
- Prompts the user to input:
- The number of players (between 2 and 10)
- The number of cards to deal to each player (between 1 and 13)
- Distributes cards accordingly:
- Each player receives the specified number of cards
- The remaining cards are placed in a separate draw pile (output dataset)
Notes:
- You may assume that users will enter only valid combinations (i.e., the total number of cards dealt will not exceed 52).
- A macro is available to shuffle the cards, if needed.
Task 3: Sort Each Player’s Hand by Custom Rules
Implement custom sorting logic for each player's hand based on the following criteria:
- Suit Frequency: Suits with fewer cards in hand appear first.
- Lowest Card Tiebreaker: If two or more suits have the same number of cards, the suit with the lowest-ranking card comes first.
- For example, a hand with 6♣-A♣ comes before Q♠-K♠ because 6 < Q.
Suit Priority: If the lowest cards are the same, use this suit priority as a final tiebreaker:- Spades (♠), Hearts (♥), Diamonds (♦), Clubs (♣)
Example:
For the hand K♦, 2♠, 6♠, 2♣, K♣:
- Suits with 2 cards: Spades and Clubs
- Both have a lowest card of 2
- Suit priority applies: Spades come before Clubs
Final order: 2♠, 6♠, 2♣, K♣, K♦
Once you have completed your challenge, include your solution file and a screenshot of your workflow as attachments to your comment.
Good Luck!
The Academy Team