Learn Blackjack Video Source & Info:
Source code is available at my github – https://github.com/ngaisteve1/BlackJack
Software Development Summary
– Technology: C#
– Framework: .NET Core 2.2
– Project Type: Console
– IDE: Visual Studio Code (Version 1.36.1)
– Paradigm or pattern of programming: Object-Oriented Programming (OOP)
– Data: Data of this demo program are stored using List objects. No database is needed for this demo version.
– NuGet: None
Basic Features / Use Cases:
– Player vs Dealer (Computer).
– Player can hit or stand.
– Simple AI for Computer as Dealer to auto hit (if hand value is 16 or less) or stand.
– Play unlimited rounds (until all cards in the deck exhausted).
– Determine winner.
– Record down total wins for player and dealer.
– Only a deck of card is in play and will be reset after certain threshold. Example if remaining card left 20.
– Player’s chips on hand.
– Player can place chip bet amount for each round.
– Each card will have Suit symbol and color (red color for Diamond and Heart).
– Double Aces – Special case for Aces. Only the first ace would count as 11. Any additional aces would count as 1. If the person receives double Aces, the hand value would be 12 and if that person hits another Ace, that Ace will be value 1. Normally, a person will split a double Aces.
– Split AA and double down, insurance
OOP principles and C# features implemented:
– enum
– class
– object
– constructor
– encapsulation: private and public, field and property
readonly
– List
– static
– this
– switch case
– string interpolation
– while loop
– ternary operator ?
– Expression-bodied members
– Random class
– override
– LINQ
My BlackJack in Javascript – https://youtu.be/oLwK69O7Wo0
Source: YouTube