Human vs AI virtual card game based on a popular casino game | Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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


‣ 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


‣ 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