Beginning Poker Program with Random Number Generator
$30-5000 USD
Cancelled
Posted almost 21 years ago
$30-5000 USD
Paid on delivery
1. Gather data on common poker hands, dealing 5 cards to create 10 hands in each deck and dealing 100 decks of cards to accumulate data. Initialize random number generator with a seed generated by a six-digit number (ex: 121280). Print out seed number used. 2. Use rand to generate a deck of cards by getting a random integer and saving it in deck[0][0] through deck[51][0]. At same time save an integer value in deck [0][1] through deck [51][1] using the counter value %13 (where the counter starts at 0 and stops after 51). This ensures that there are 52 cards with 4 zeroes, 4 ones, 4 twos, ..., 4 twelves contained in the second column of the deck matrix. 3. Use a sort function to shuffle or reorder each deck before dealing out the 10 hands. Pass matrix to sort function and reorder rows based on the integers in the first column. 4. Count number of hands that have following characteristic and print out how many of the 1000 hands had this characteristic: A hand with a consecutive run of 5 cards.
## Deliverables
1) Source code in C that works and accomplishes task.
## Platform
Just in C code (not C++)