So I had to code a game of Blackjack, which is due in a few hours, but I had the neat idea to post it here to see if I missed anything, or if any part of it is broken. PLEASE DON'T USE INTERNET EXPLORER (It doesn't work properly
). Dealer wins ties, btw
I added a ranking system just cause I could....
My code:
http://www.codeskulptor.org/#user26_CFYrTffXEQ_4.pyGrading rubric:
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.