Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Title
Update BlackjackGame.py
Summary
These improvements enhance the gameplay experience and make the Blackjack code more robust and user-friendly
Description
The changes are as follows
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.
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.
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]