Skip to content

Conversation

@dsg753
Copy link
Contributor

@dsg753 dsg753 commented Aug 26, 2024

PR Title

Update BlackjackGame.py

Summary

These improvements enhance the gameplay experience and make the Blackjack code more robust and user-friendly

Description

  1. Enhanced Betting Functionality:
  2. Improved Card Handling:
  3. Enhanced Game Logic:

The changes are as follows

  1. Enhanced Betting Functionality:
    Valid Bet Validation: The placeBet() method now ensures that players enter valid bets within the specified range and that they have sufficient funds.
    Clear Error Messages: Informative messages are provided for invalid inputs or insufficient funds.

  2. Improved Card Handling:
    Ace Value Adjustment: The adjustAceValue() method correctly handles cases where an ace's value should be reduced to 1 to prevent a bust.

  3. Enhanced Game Logic:
    Simplified Winner Determination: The playRound3() method now uses a separate determine_winner() function to improve code readability and maintainability.

  4. Additional Features:
    Initial Bankroll: Players now start with an initial bankroll of 1000 units.
    Betting Limits: Minimum and maximum betting limits have been introduced.

[dsg753]

1. Enhanced Betting Functionality:

Valid Bet Validation: The placeBet() method now ensures that players enter valid bets within the specified range and that they have sufficient funds.
Clear Error Messages: Informative messages are provided for invalid inputs or insufficient funds.

2. Improved Card Handling:

Ace Value Adjustment: The adjustAceValue() method correctly handles cases where an ace's value should be reduced to 1 to prevent a bust.

. Enhanced Game Logic:

Simplified Winner Determination: The playRound3() method now uses a separate determine_winner() function to improve code readability and maintainability.

4. Additional Features:

Initial Bankroll: Players now start with an initial bankroll of 1000 units.
Betting Limits: Minimum and maximum betting limits have been introduced.
@epicadidash epicadidash merged commit 6590c5e into wasmerio:master Aug 26, 2024
@epicadidash
Copy link

Excellent work @dsg753 !!!

@dsg753
Copy link
Contributor Author

dsg753 commented Aug 26, 2024

Thank you .

@dsg753 dsg753 deleted the Python-Scripts branch August 26, 2024 17:06
@dsg753 dsg753 restored the Python-Scripts branch August 26, 2024 17:06
@dsg753 dsg753 deleted the Python-Scripts branch August 26, 2024 17:06
@epicadidash
Copy link

Are you on twitter @dsg753

@dsg753
Copy link
Contributor Author

dsg753 commented Aug 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants