June 21st, 2012, 08:02 AM
Help Help Help - Asap!!! Python Game!!!
**PLEASE HELP ASAP!!!
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.
June 21st, 2012, 10:44 AM
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 11:10 AM.
June 27th, 2012, 10:25 AM
I agree strongly with Schol-R-LEA
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25