Blackjack Game Final Version
This is the final version of my Blackjack game. The major difference between the final version and an earlier version is the Ace card. In the final version, the Ace card can either have a value of 1 or 10. This depends on the value of the hand.
Below is the code used for the Ace card:
if 'A' in c_ranks and self.hand_value +10 <= 21:
self.hand_value = sum(h_val) + 10
else:
self.hand_value = sum(h_val)
You can see the final version in the video.
Here is the grading rubric which describe how the game was graded:
You must implement the rules of Blackjack specified in this description.
• 1 pt - The program displays the title "Blackjack" on the canvas.
• 1 pt - The program displays 3 buttons ("Deal", "Hit" and "Stand") in the control area.
• 2 pts - The program graphically displays the player's hand using card images. (1 pt if text is displayed in the console instead)
• 2 pts - The program graphically displays the dealer's hand using card images. Displaying both of the dealer's cards face up is allowable when evaluating this bullet. (1 pt if text displayed in the console instead)
• 1 pt - The dealer's hole card is hidden until the current round is over. After the round is over, it is displayed.
• 2 pts - Pressing the "Deal" button deals out two cards each to the player and dealer. (1 pt per player)
• 1 pt - Pressing the "Deal" button in the middle of the round causes the player to lose the current round.
• 1 pt - Pressing the "Hit" button deals another card to the player.
• 1 pt - Pressing the "Stand" button deals cards to the dealer as necessary.
• 1 pt - The program correctly recognizes the player busting.
• 1 pt - The program correctly recognizes the dealer busting.
• 1 pt - The program correctly computes hand values and declares a winner. Evaluate based on messages.
• 2 pts - The program accurately prompts the player for an action with messages similar to "Hit or stand?" and "New deal?". (1 pt per message)
• 1 pt - The program implements a scoring system that correctly reflects wins and losses. Please be generous in evaluating this item.
Below is the code used for the Ace card:
if 'A' in c_ranks and self.hand_value +10 <= 21:
self.hand_value = sum(h_val) + 10
else:
self.hand_value = sum(h_val)
You can see the final version in the video.
Here is the grading rubric which describe how the game was graded:
You must implement the rules of Blackjack specified in this description.
• 1 pt - The program displays the title "Blackjack" on the canvas.
• 1 pt - The program displays 3 buttons ("Deal", "Hit" and "Stand") in the control area.
• 2 pts - The program graphically displays the player's hand using card images. (1 pt if text is displayed in the console instead)
• 2 pts - The program graphically displays the dealer's hand using card images. Displaying both of the dealer's cards face up is allowable when evaluating this bullet. (1 pt if text displayed in the console instead)
• 1 pt - The dealer's hole card is hidden until the current round is over. After the round is over, it is displayed.
• 2 pts - Pressing the "Deal" button deals out two cards each to the player and dealer. (1 pt per player)
• 1 pt - Pressing the "Deal" button in the middle of the round causes the player to lose the current round.
• 1 pt - Pressing the "Hit" button deals another card to the player.
• 1 pt - Pressing the "Stand" button deals cards to the dealer as necessary.
• 1 pt - The program correctly recognizes the player busting.
• 1 pt - The program correctly recognizes the dealer busting.
• 1 pt - The program correctly computes hand values and declares a winner. Evaluate based on messages.
• 2 pts - The program accurately prompts the player for an action with messages similar to "Hit or stand?" and "New deal?". (1 pt per message)
• 1 pt - The program implements a scoring system that correctly reflects wins and losses. Please be generous in evaluating this item.
Comments
Post a Comment