[Tutor] blackjack game

Steven D'Aprano steve at pearwood.info
Fri Apr 30 03:35:18 CEST 2010


On Fri, 30 Apr 2010 06:23:44 am Shurui Liu (Aaron Liu) wrote:

> Here is the code of this game. I want to change some part of them.
> 1. Since I don't know what part of code is "responsible" for the
> number of cards, so I don't know how to add a "card number check"
> attribute, I mean, to check the number of card is more enough for
> next time play no matter how many players there are, if cards are not
> more enough, print out a notice and stop the program;

In real life, cards are dealt from a deck, and if the deck does not have 
enough cards, something will happen -- usually the dealer will start a 
new, shuffled, deck. Does your code have a deck?

> 2. I am not sure if I can let the winner get all of the cards and
> print out what cards the winner has when the game finished.

That's a question about blackjack, not Python. Since I don't play 
blackjack, I don't know.



-- 
Steven D'Aprano


More information about the Tutor mailing list