Skip to content

nwtsai/blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack

Human vs AI virtual card game based on a popular casino game

Description

‣ The object of the game is to beat the dealer (AI) by getting a count as close to 21 as possible, without going over 21

‣ Face cards are worth 10, and the numbered cards are worth their pip value. The ace is worth 1 or 11, depending on which is more advantageous

‣ The player can stand by not asking for another card, or hit by asking for another card dealt from the deck

‣ Once the player stands, the winner of the round is determined by who has the highest count under 21. If only the player busts (count over 21), then the dealer wins, and vice versa. Otherwise, it's a draw

Design

‣ Programmed a virtual card game with Java by implementing an aesthetic interface and interactive graphics

‣ Constructed a decision tree that guides the AI and teaches it how to make smart decisions based on intuitive game logic

‣ Developed code that takes into account the varying values of the Ace card, assigning the card a value when it is advantageous for the player or the AI

‣ Implemented counters for undealt cards, total games won, and total games played. Once a card is dealt, the same card will not appear unless the player chooses to reset the deck by pressing the Restart button

About

Human vs AI virtual card game based on a popular casino game | Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages