1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Rep Power

    Post Help Help Help - Asap!!! Python Game!!!


    I need help completing this by tomorrow afternoon!!!
    Can anybody write this for me????????

    Chemin de Fer is a French card game. You will be creating a simulation of this card game.

    In Chemin de Fer, cards have the following values: aces are worth 1, cards 2 to 9 are worth their face values, and 10s, Jacks, Queens and Kings are worth zero. The value of a hand is the rightmost digit of the sum of the card values. For example, if a player holds a 6 and a 8, the sum of these is 14, so the value of the hand is 4. (In other words, the remainder after dividing by 10.)

    Some further examples:
    4, A and 5 - value: 0
    6, 5 - value: 1
    8, K - value: 8
    8, K, 2 - value: 0
    9, 8 - value: 7

    The highest possible value for a hand is 9. The lowest possible value for a hand is 0.

    Six decks of cards are used in Chemin de Fer, all shuffled together.

    The dealer gives two cards face down to the player and then two to himself.

    If either the player or the dealer has a hand with a value of 8 or 9 (called a 'natural'), both hands are shown and the higher value hand wins.

    If neither player has a 'natural', then the player can choose whether or not to accept a third card. The dealer can then also decide whether to accept a third card.

    In practice, the following conventions are followed - if the player's hand is worth 6 or 7, he always refuses the third card. If it is worth 0, 1, 2, 3 or 4, he always accepts the third card. If it is worth 5, he may choose as he likes. The dealer then follows the same pattern.

    For the purposes of creating this simulation, you may choose how the dealer behaves when his hand is worth 5 (e.g. always accept or always refuse or randomise or alternate, etc.), but otherwise your simulation must follow the conventions described above.

    Your simulation needs to do the following:
    let the user take the role of the player and the computer take the role of the dealer.
    accurately model the shuffle (randomisation) of six combined standard decks of cards (52 cards, no jokers) and the subsequent drawing of cards from the combined shuffled deck. (Drawn cards are not returned to the deck.)
    calculate and display the value of both the player's and dealer's hands.
    keep track of the number of hands won and lost by both player and dealer.
  2. #2
  3. Commie Mutant Traitor
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2004
    Alpharetta, GA
    Rep Power
    You'll get the same answer here that you got on DaniWeb - we don't do homework for people. Show us your code, and we'll help you fix it, but coming here demanding that we hand you a solution isn't going to work.

    Oh, and cross-posting is generally considered very rude. That's strike two - if you want to be taken seriously here, you have one chance left, don't blow it.

    BTW, this should be about a week's worth of work at most, more like a day if you sit down at it without breaks. How much time were you given for this project to begin with?

    Oh, and to repeat what I said on DaniWeb: if I can find this as easily as I did, don't you think that the professor will find it here, too? It has happened before, so it isn't as implausible as it sounds, and I can assure you that schools don't take kindly to this sort of thing.
    Last edited by Schol-R-LEA; June 21st, 2012 at 10:10 AM.
    Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
    #define KINSEY (rand() % 7) λ Scheme is the Red Pill
    Scheme in Short Understanding the C/C++ Preprocessor
    Taming Python A Highly Opinionated Review of Programming Languages for the Novice, v1.1

    FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2005
    Rep Power
    I agree strongly with Schol-R-LEA
    Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25

IMN logo majestic logo threadwatch logo seochat tools logo