Welcome back Val and Sam! Please get your program updated from one of the others. Make sure that you know how it works as well.
So far we have created three classes:
Card
Deck
Hand
In order to recognize which hand is which, we should add a name attribute to the Hand class that stores the name of the player. This should also be added as part of the initialization.
We now need to create a new string function for the Hand class that prints the name and the cards.
Now we need to create a new class that brings them all together:
class Game():
The initialization should take a list of names, then create a hand for each of these names.
It should also create a deck of cards, then remove the Queen of Clubs from the deck.
Now create a play method that starts by shuffling the deck of cards, then deals all the cards out evenly.
Do as best you can, we'll work with them more on Monday.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment