Found something useful? Don't forget to leave a comment!

Wednesday, August 20, 2008

Blackjack in Java - an AP Computer Science Project

Now, after the conclusion of my AP Computer Science A class/camp/summer program at Northwestern University's CTD, it's time to release the program my partner, Francis Chen, and I created as a final project - a simple text-based Blackjack game written in Java. Originally, we planned to go for a GUI version as well, but that turned out be a little complicated...

Blackjack v1.01 is licensed under the GPLv3. Features include:

  • classic casino-style Blackjack play
  • player chooses starting cash and bets
  • hit, stand or double down
  • dealer hits on soft 17 (Vegas-style)
  • insurance for dealer's ace
  • fully random card draws and deck shuffling
  • standard 3:2 natural and 1:1 blackjack payouts
  • source code included w/ comments




The download package contains source code, a Windows EXE, and a cross-platform JAR (ideal for Mac and Linux users).

On Windows: Run the EXE. Duh.

On other platforms: open a command-line and type:
java -jar blackjack-bin.jar


No comments: