Assignment 6
A Better Game of 21
Did we not just do this!
Yes, we did but most games have a version 2.0.
Here is the problem
Create a program to simulate a one deck version of the game 21 against the computer. A deck of 52 cards (no jokers) is used and no card can be repeated. The program starts by dealing the user 2 randomly picked cards and itself 3 that are not revealed until “Check” is clicked. The user may draw 1 additional card if they want. If the user and computer scores are both over 21, the game is a draw. If both have the same score but under 21, the computer wins. Otherwise, the winner is the one with the highest score less than or equal to 21. You MUST use a function to turn over the cards. Yes, the function might have a really long If ... ElseIf ... (or you might find another way to do it) but at least you only have to write it once not 6 times. You probably should have other procedures/functions as well.
Two Part Assignment
- This is a 2-week assignment:
- Week 1 hand in DESIGN AND TEST CASES ONLY
- Week 2 hand in EVERYTHING (INCLUDING ABOVE)
- Each week ENSURE you include the Marking Rubric
Things to note
- If you are not sure on any part of the problem, just ask me and I will give you additional information
- You must do the program in Python first (get a 3+).
- you can get a 4+ if you do it in another language OR (any three below)
- use a way to ask (Yes or No) if the user wants the third card
- the user can keep drawing cards until they reach 21
- have the user start with an amount of money and let them bet some each round. If they win, their bet amount doubles. Let them keep playing until they run out of money
- save the state of the program. If they (gracefully) close the program and start up again, the cards that were there and calculated amounts re-appear
- have the option to make an Ace to be value 11 or 1!
- have the dealer keep drawing cards until he reaches 17 or more
- you can get a 4+ if you do it in another language OR (any three below)
- See Marking Rubric below
- Ensure you work through (in order):
- GUI Design
- Top-down (always only 1)
- Flow-chart (1 for each "click" event and each procedure or function)
Pseudo-code(you do not need to do it anymore!)- Final, debugged, commented code
- NO GitHub link
- Remember to think, Input – Process – Output, when designing your program
- The final assignment MUST be in one (1) *.pdf file when you are submitting each part
- Part A:
- Document Name
- ensure it is the assignment #, course code, and your full name
- Cover Page
- this will include the assignment #, course code, and your full name
- Checklist
- documenting the parts of the assignment that are to be included and stating that you have included them
- Design Document(s):
- this includes GUI Design, Top-down Design, Flow-chart(s)
- Test Cases:
- at least three (3) test cases (maybe more if it is needed!); think about what would you need for test cases in this game?
- Marking Rubric:
- ensure you include the correct assignment marking rubric
- Document Name
- Part B:
- Document Name
- ensure it is the assignment #, course code, and your full name
- Cover Page
- this will include the assignment #, course code, and your full name
- Check List
- documenting the parts of the assignment that are to be included and stating that you have included them
- Design Document(s):
- this includes GUI Design, Top-down Design and Flow-chart(s)
- Test Cases:
- at least three (3) test cases (maybe more if it is needed!) done by some other method than your (or some else's) program
- Screen Shots:
- screen shots of your running program
- you will include a screen shot for each test case you have from above, proving your program actually works
- Code:
- you must get ALL of the code into your document (in a logical order) as plain text.
- GitHub link
- the URL of your repo
- Marking Rubric:
- ensure you include the correct assignment marking rubric
- Document Name
- Part A: