What a better way to learn Core, than building a game. For this fun project, I decided to build a version of Blackjack using C#, Visual Studio Code, xUnit, and of course .NET Core.
The project is hosted at GitHub and some of the main goals for this project are:
– cross-platform (must run on windows, mac, and linux)
– unit tests are required
– all tools and processes used must be open source
I created issues to start this project in the right path. The main classes for this game should be Card, Player, Deck, and Game.
Based on bicyclecards.com, the rules of the games are:
– each participant attempts to beat the dealer by getting a count as close to 21 as possible, without going over 21.
– it is up to each individual player if an ace is worth 1 or 11. Face cards are 10 and any other card is its pip value.
– if a player goes over 21, he/she loses
For this project, I’m going to use bicycle cards as a guide for the requirements since there are many rules for this game.
I hope that you join me in learning .NET Core and at the same time have fun playing 21.