Skip to content

ManjunathMGM/Blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🃏 Python Blackjack Game

Dive into the world of cards with this Python Blackjack Game! Play and test your luck and strategy in this classic casino game.

♠️ Description ♣️

This Python Blackjack Game brings the excitement of the casino to your terminal! It's a classic card game where you aim to beat the dealer by getting a hand value as close to 21 as possible without exceeding it. Test your luck and strategy with this entertaining Python project.

♦️ Blackjack Rules ♥️

In this Python Blackjack Game, we follow the classic rules of the game. Here's a brief overview:

  1. Objective:

    • The main goal is to beat the dealer by having a hand value as close to 21 as possible without exceeding it.
  2. Card Values:

    • Number cards (2 - 10) are worth their face value.
    • Face cards (Jack, Queen, King) are each worth 10.
    • Aces can be worth 1 or 11, depending on which value benefits the hand more.
  3. The Deal:

    • The player is initially dealt two cards.
    • The dealer is also dealt two cards, with one card face up and the other face down.
  4. Gameplay:

    • The player can choose to 'hit' (take another card) or 'stand' (keep the current hand).
    • If the player's hand value exceeds 21, they 'bust' and lose the round.
    • The dealer reveals their face-down card after the player's turn.
  5. Dealer's Turn:

    • The dealer must hit until their hand value is at least 17.
    • If the dealer busts, the player wins the round.
  6. Winning:

    • The player wins if their hand value is closer to 21 than the dealer without busting.
    • If the player and dealer have the same hand value, it's a 'push' (tie).
  7. Blackjack:

    • If a player is dealt an Ace and a 10-value card (10, Jack, Queen, King) as their initial two cards, they have a 'Blackjack' and usually win the round.

These are simplified rules, and there might be variations depending on the specific Blackjack variant you are playing.

🌈 Example

♥️♠️ Do you want to play a game of Blackjack? (yes, no) ♦️♣  yes
   Your cards: [10, 8]  current score: 18
   Computer's first card: 8
Type 'hit' to get another card, type 'stand' to pass: stand
   Your final hand: [10, 8], final score: 18
   Computer's final hand: [8, 6, 1, 9], final score: 24
Opponent went over. You win 😁 

🤝 Contributing

Contributions are always welcome! Whether you find a bug, have a suggestion, or want to add a feature—just open an issue or submit a pull request. Let's improve this project together! ✨

📝 License

This project is licensed under MIT license.

😄 Author

Manjunath MGM

Shiv Nadar University
[email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages