Overview

For this project you will write a class named Blackjack that implements the game logic associated with a blackjack card game. The Blackjack class implements the BlackjackEngine Java interface whose definition you can find in the project's javadoc documentation

Unlike other class projects, for this project you are allowed to discuss or receive help from your classmates, but you may not exchange any code. Every student must implement their own code. If you are assisted by a student add the name of the student to the top of the Blackjack.java file.

Objectives

This project will give you practice using classes, ArrayList and other fundamental Java Constructs.

Grading

Code Distribution

The project's code distribution is available by checking out the project named 132Spring19Project1. The code distribution provides you with the following:

Specifications

Blackjack Rules

If you have been to Vegas then you are familiar with the rules to play blackjack (also known as 21).  However, what happens in Vegas stays in Vegas, therefore the rules for blackjack in this project are different.  If you want to familiarize yourself with the game, check the online blackjack game available at http://www.247blackjack.com/Note that the rules we will use are not exactly the same ones used in this online game.

In our blackjack version we have a dealer (person who shuffles and distribute cards) and only one player.  The game's objective is for the player to beat the dealer by generating a hand of cards whose value is higher than the dealer's hand without exceeding a total value of 21.  The game starts by the dealer shuffling cards (one or more decks) and dealing two cards to the player and herself/himself (the actual order is described in the project's javadoc documentation).  One of the dealer's cards will be face down.  At this point the player will ask for cards until he/she believes he/she can beat the dealer with the current hand and as long the cards' total value does not exceed 21.  If the hand of cards does not exceed 21, and the player stops requesting cards (what is referred to as "stand"), then the dealer will flip the card that was face down, and proceed to deal cards to himself/herself as long as the cards' value is less than 16 and does not exceed 21.   If a value greater than 21 is generated the player wins.  Otherwise whoever (player or dealer) has the hand with the highest value will win the game.  The following provides additional information about the game:

Requirements

Sample Run

Game Video illustrates the functionality associated with the application.

Suggestions on How To Start the Project

Web Accessibility