CSC 221: Introduction to Programming
Fall 2018

HW7: Classes and Design

Note: late submissions will not be accepted for this assignment.


For this assignment, you are to design and implement a Python project for playing an interactive card game named FullFlush. In FullFlush, a person starts with a shuffled deck of cards and deals a hand of five cards. If those cards are either a flush (all of the same suit) or a full house (three of one rank and two of another), then the player wins. If not, then the player repeatedly draws, choosing to replace any number of cards in the hand with new cards dealt from the deck. The goal is to obtain either a flush or full house in the fewest number of draws. If the deck is exhausted before either a flush or full house is obtained, then the player loses.

For example:

The output format for your project should match the above examples exactly. You should utilize the Card and Deck_of_card classes from cards.py in your project. For full credit, your code should not crash under any circumstances. If the user enters invalid input, then an error message should be displayed and the game should continue.