Skip to content

Simple blackjack program in Java.

Notifications You must be signed in to change notification settings

0reldev/blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack program

Simple black-jack game coded in Java

Introduction

During my web developper training course at the Wild Code School, I've been asked to code a simple black-jack game in Java to practice the basics.

Rules

There are two players: the Player (us), and the Dealer (a bot). Each player will draw two cards, turn by turn, starting by the Player. When the Player's turn ends, the addition of the two cards are added to his current score (itinialized to 0). When the Dealer plays, only one of its cards is revealed, and the other one is face-down. The Player has to decide if he continues to draw cards or not for trying to get as close as possible to the score 21 without exceeding it.

If the Player's score exceeds 21, he loses even if the Dealer exceeds 21 too.

If the Dealer exceeds 21 and the Player doesn't, the Player wins.

If the final score of the Player is higher than the Dealer's one without exceeding 21, the Player wins.

If an Ace is drawn, the Player can decide is a 1 or a 11 is considered.

Faces cards (Jack, Queen and King) are all worth 10.

Program execution examples

screen capture 1

screen capture 2

About

Simple blackjack program in Java.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages