This C program simulate a deck of cards and deal a hand of cards
gcc MainDeckOfCards.c Deck.c Card.c Hand.c -o MainDeckOfCards.out
make
./MainDeckOfCards.out 5 7
The header file "DeckofCards.h" must be in the project directory
This program simulate a deck of cards and deal a hand of cards
Input is provided via command-line arguments Input will specify the numbers of cards per hand and the numbers of players, in that order. Execution would look something like: ./MainDeckOFCard.out 7 5
Two Integer are expected via command line arguments
-
First integer is the number of Cards [5], poker requires 5 cardsany other integer value entered different than 5 will be converted to 5
-
Second Integer is the number of players [1-10]
The program will display the following information:
- The original deck of cards (ordered)
- The shuffled deck of cards (random)
- Each of the player’s hands of cards
- Players' hand sorted in ascending order.
- Players' hand with labels, type of hand and winners.
- Poker hands test.
- Create the deck of cards
- Display the original deck (ordered)
- Shuffle the deck
- Display the shuffled deck (random)
- Deal card from the top of the deck
- Display players' hands.
- Sort and Display players' hands
- Classify players' hands
- Compute winner(s)
- Display players' hands with hand type and winner labels
- Test method to classify hands, display test's hands