Home About Portfolio Blog Contact
Home About Portfolio Blog Contact

Blackjack Game In Java

The first time I have ever heard of the term blackjack was through Grand Theft Auto: San Andreas in a casino when I was 14. I took a break from doing missions in the game and during my first five minutes of playing Blackjack, I had so many questions. “Why does it always mention bust when I have too many cards? How can an Ace be either a 1 or 11? Why do the cards come out of the dealer’s sleeve instead of an stack of cards?” That last question I still don’t know the anwswer to. “Wait a minute, the dealer just beat me with a King and an Ace. So the object of the game is to win at 21? Why not call this game 21?” Turns out, blackjack refers to any hand of an ace plus a ten or face card regardless of suits or colors.

This program executes the basic logic of the Blackjack game between two players: human-player and casino-player. The Casino-player follows simple “stand on 17” rule. Human-player interacts with user utilizing standard input/standard output. This implementation supports the following BlackJack actions:

HIT – Player takes one card from Dealer
STAY – Player makes a current hand final

Currently working on the issue when the game ends abruptly after either busting or winning. Clicking on the image below will let you download the game under the rar file called FinishedGame.rar

Installation: Download and unpack the source code to the download folder.
There should be a FinishedGame.Jar and a RUN.BAT file.

Usage: Once the files are unzipped, you can run the code by invoking the RUN.Bat file.


Feel free to review the source code of each class, with the GameRunner being the main one, in my Github profile.