Starting from:

$25

VE280 - Project 3 - Blackjack - Solved


 
Ⅰ. Background 
The Cultural Festival turned out a success for SOS Brigade   . After struggling for making the movie for so long, they finally went back to their normal routine. However, a group of five huge men broke into their club activity room and asked the members of SOS Brigade to play their designed game B l a c k j a c k . Actually, the computer storing SOS Quantum Library (see Lab1 ex.1) orginally belonged to Joseph J o e s t a r , but S u z u m i y a H a r u h i robbed it. At that time Joseph was busy with dealing with D i o B r a n d o and did not have time to deal with H a r u h i    . Now D i o B r a n d o is dead and Joseph comes back to get his computer back. The Stardust Crusaders led by Joseph  J o s t a r will compete SOS Brigade led by S u z u m i y a H a r u h i  through this game. Joseph J o s t a r  will borrow 4computers to SOS Brigade. If Stardust Crusaders wins, Joseph will get his computer back and get a member of SOS Brigade into Stardust crusaders. If SOS Brigade  wins, those four computers will belong to SOS Brigade and Stardust Crusaders will be an affiliate group of SOS Brigade. 
Ⅱ. Introduction 
You need to firstly help Joseph J o e s t a r to implement this card game. It is played with a standard deck of 52 playing cards. There are two participants a dealer and a player. The player starts with a bankroll, and the game progresses in hands and rounds. 
At the start of each hand, the player decides how much to wager on this hand. The wager is an integer greater or equal to a minimum allowable wager and less than or equal to the player’s total bankroll. 
After the wager, the dealer deals a total of four cards: 
1 . face-up to the player, 2 . face-up to the dealer, 3 . face-up to the player, 4 . face-down to the dealer, hole card. 
The player then examines his cards and calculate the total number of his card's worth. Different cards have different worth: 

2-10 is worth ts pot value face card (jack, queen, king) is worth 01 Ace is worth 1 or ,1 depending on whch s more advantageous to the player. 
If the total includes an ace counted as 1 the total is caled soft, otherwise it is called hard. 
The game progresses first with the player, then the dealer. The player’s goal is to build a hand that is as close to 21as possible wthout going over---the latter is caled a bust, and a player who busts loses the hand and his bankroll will decrease by his wager. For cards whether soft or hard, players/dealers only care about the current situation, i.e. they are greedy. They do not have the ability to foresee. As long as the player believes another card will help, the player hits---asks the dealer for another card. Each of these additional cards is dealt face-up. This process ends either 

More products