Find Jobs
Hire Freelancers

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++)
Project ID: 2930884

About the project

Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of
0.0
0
Member since May 1, 2003

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.