By Sagar Naskar
This is a regular blackjack game written using Java programming language. This a single player game where the user plays against the bot.
This is a regular Blackjack game using 8 decks of cards, using Java programming language.
Input- int bet takes the betting amount as input. int choice takes the user's play choice(hit/double/stay) as input. int n is reused as an input in the later part to determine whether the user wants to keep on playing or exit the game.
Output- The program displays everything which the game needs to display like the cards drawn by the player as well as the cards drawn by the bot. Win and lose situations are well displayed.
The deck of cards is stored in an array. There is use of java.util.* and java.util.random packages in the program. Scanner class and random class are used to take input and generate random number in the program. Cards are pulled at random from the deck and removed simultaneously as the game. The game stops when the user has an empty purse or goes into debt; as well as the user can exit at the end of any round.
Submitted by Sagar Naskar (sagarN)
Download packets of source code on Coders Packet