Skip to content

Files

Latest commit

Dec 10, 2015
ee09d85 · Dec 10, 2015

History

History

cardgame

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 9, 2015
Dec 10, 2015
Dec 10, 2015

Card game

In this problem, you will implement logic that deals hands from a deck of playing cards, as for a card game.

We've provided you with a class Card, which represents a single card. While you do not have to understand it completely, read it over to gain a basic understanding.

We've also provided you with a class Dealer. Your task is to implement the method deal(), which deals cards from a shuffled deck into hands. The number of hands (players in the card game) and cards in each hand are passed as arguments.

This method already contains logic that returns shuffled deck of cards as a list of Card instances in a random order. You do not need to understand how it works. Use this method to obtain a shuffled deck, and deal the cards to the players from the deck.

The Dealer.main() method prints out the hands you've produced. You may use this to inspect the output of your method.