Skip to content

vali0901/Blackjack_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack Game

This is a project in which I wanted to simulate as authentically as possible the game of blackjack as it is in real life. Thus, card shuffling and dealing the cards are similar to those in casinos. In addition, I implemented a "database" so that each user can see different statistics about what he played. So, in order to do that, you can only play if you are logged_in (log_in) and if you dont have an "account", you can create one (register_user). Once you are logged in, you can see your statistics (user_info), refill your balance (deposit), delete your account (delete_user), log out from your account (log_out) or you can start playing (play).

The game process is divided into several stages. The first is card shuffling, where the user is asked how many decks of cards he wants to play with (he can choose 1, 2, 4, or 8 decks). Then follows the shuffling of the cards that simulates "the casino wash". Using random number generation functions, the deck of cards is reorganized. At the same time, a red card will be inserted into the pack of cards, which is placed approximately in the middle of the pack and will indicate the end of the session and the need for another shuffle. Now the dealing of cards begins. At the beginning, the user will choose the number of bets (the number of seats at a real blackjack table) and then the stake for each bet. The cards will be dealt as in the real game as follows: one row of cards for the player, one card for the dealer, the second row of cards for the player and one more card for the dealer that will be turned face down. Next comes the stage where the player has to make the decisions for each hand, followed by the reveal of the dealer's unknown card and the conclusion of the winnings. At the end of each session (when the red card is drawn or the player wants to exit the game), the deck will keep its actual order and will be shuffled at the start of every other game to maintain a level of randomization as high as possible.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors