Assignment 8
Assignment Requirements
Create a program that includes a PlayingCard and Deck class, and then implement a game that uses those classes. You have a couple of options for how you can do this:
Option 1: Make a minor change to the High Card game
Finish the PlayingCard and Deck classes so that they work with th High Card game we started in class (including __repr__. shuffle(), and is_empty()), and make some kind of change to the High Card game that is implemented there. The change doesn’t have to be extreme, but it should involve either calling the Deck/PlayingCard methods in a new or different way or it should involve adding a new method to Deck or PlayingCard and then using that in a meaningful way.
Option 2: Do something more creative
Implement some other game using your PlayingCard and Deck class. In this case, your PlayingCard and Deck might be a little different than what we did in class to accomodate the needs of your game. That’s ok, but I do want to see both classes defined, and I want to see that you use them.
What to turn in
Make sure you put your code in a file called carddeck.py. Then, include a big comment with the following
- say whether you are doing Option 1 or 2
- say what change you made or what new game you implemented
- paste in a sample run that show off what your program does
Then submit your code to Assignment 8: Playing Card & Deck on codePost.
Grading
This is a 4-point assignment. See the rubric from the syllabus.
A note about automated testing
As a way to test your PlayingCard and Deck classes, I included the original High Card game as an automated test. If you are doing Option 1, then your code should pass this test! You should still include the big comment described above.
However, if you are doing Option 2, it might fail because of your changes to the design we did together. That’s ok as long as you include the big comment described above.