MEGA SEMESTER PROJECT

Blackjack simulator 2005

 

Intro:  You are going to be writing a Java blackjack simulator.  Blackjack is a game whereby a player  and delaer both start with two cards.  The goal is for the sum of your two cards to exceed the sum of the dealerıs two cards.  You can only see ONE of the dealerıs cards.  The best possible hand is a sum of 21.  Anything larger than 21 is called a ³bust,² and is an automatic loss.   

 

Objective:  This program is designed to stretch your thinking in terms of control structures, user interface, and object oriented programming 

 

Things to be aware of:

 

Interface Considerations:

 

Bonuses: (BUT I reserve the right to make any of these mandatory): 

a)     Splitting is the option of the player playing two hands at once when they receive a pair.  For example, a user might have 8h, 8s.  They can choose to place an additional bet equal to the bet currently on the table and play each 8 as a separate hand.  

a.     Bonus 1:  Allow the user to split any pair

b.     Bonus 2:  The user  can split aces only once and receives only 1 card for each ace.  

b)    Doubling down is the option of the player to double their bet on the table, but they only get 1 card.

a.     Bonus 3:  User can double down on any hand but remember they get only one card

c)     Itıs more fun if you can ³see² the cards rather than read text such as 8h (8 hearts) or As (ace of spades). 

a.     Bonus 4:  Cards are drawn (crudely is fine) on screen or you can read up on GUI and import gif/jpeg images of cards to be displayed.

d)    If the dealer has an ace showing, the dealer must privately check to see if she has blackjack before the player can hit or stand.  If the dealer does have blackjack, this is an automatic loss for all players.   

a.     Bonus 5:  If a dealer has blackjack, you auto-lose.  (Dealer checks for blackjack with an ace showing before the player gets to act.) 

e)     At most casinos, if you have blackjack, you win 3:2, which means you get 1.5 times your bet back in winnings.  For example, if you bet $10 and got blackjack, the dealer would give you your $10 back and an additional $15 for your win. 

a.     Bonus 6:  Blackjack is defined as your first two cards totaling 21.  This can be Ace-10, Ace-Jack, Ace-Queen, or Ace-King.  If you get blackjack, pay the player 3:2.  (Play then ends and the next hand is dealt.)   

f)     Some casinos have ³fun² rules to keep people interested.  Here are some:

a.     Bonus 7:  If you draw seven cards on one hand without busting, you auto-win $100.  (This is regardless of the amount of money bet by the player.  The player's bet is simply returned to him.) 

b.     Bonus 8:  If you get blackjack 3 consecutive hands, you auto-win $500 

g)    If dealer has ace showing, the player knows the dealer may very well have blackjack, which would be an auto-loss.  Thus, casinos let you buy ³insurance.²  

a.     Bonus 9:  If dealer has ace showing, prompt the player for insurance.  If the player chooses to buy insurance, it will cost him half his bet.  If the dealer has blackjack, the player loses his original bet but gets double his insurance bet (breaks even).  If the dealer doesnıt have blackjack, then the insurance bet is lost but play resumes as normal with the original bet.  

h)    Blackjack is a ³House² game, which means the casino is always the favorite to win.  However, there are strategies available (verifiable via math) which can minimize the playerıs long term losses. 

a.     Bonus 10:  User can ask for hints based on the hand they have and what the dealer is showing.  Check out this website for more info:

b.     http://www.blackjackinfo.com/cgi-bin/bjbse.cgi?game=lv6   

i)      Some casinos let you ³surrender² your bet, which means you can choose to automatically give away half your bet if you feel that have you little chance of winning that hand.  Surrender must occur before any additional cards are taken by the player. 

a.     Bonus 11:  Allow the user to surrender a bet. 

 

 

Grading Timeline:

 

Checkpoint:     December 2nd – Class Diagram Due (15 points)

            Part I:  Class Summary Boxes – for each desired class, you will provide

·      Class name

·      Instance Data

·      Methods

Part II:  Inheritance Diagram  (10 points)

·      Draw a diagram that shows the inheritance relationships between your classes

 

HARD DUE DATE: JANUARY 13th.   (If you do bonuses, you must create a tester that shows that all bonuses you attempted work properly.)   (50 points) 

 

Collaborative Guidelines: 

·      You may work alone or in pairs. 

·      If you work in pairs, you will be required to do a write up that details EXACTLY what each person contributed.  You will also give a collaboration grade to the other person.

·      If you work in pairs, you are required to do a minimum of six bonuses of your choosing.    

·      If you are NOT in a collaborative group, code-sharing is a violation of the academic honesty policy.  You can help a friend debug, but you can't share your own code.