TehDeck 1.0.0

.NET Core 3.1
dotnet add package TehDeck --version 1.0.0
NuGet\Install-Package TehDeck -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TehDeck" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TehDeck --version 1.0.0
#r "nuget: TehDeck, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TehDeck as a Cake Addin
#addin nuget:?package=TehDeck&version=1.0.0

// Install TehDeck as a Cake Tool
#tool nuget:?package=TehDeck&version=1.0.0


TehDeck is a .NET API designed to ease the creation of custom Cards and Decks for games.


Creating a custom Card<br>Inherit from Card class, and override IsEqualTo(Card) function. It's that simple.

Creating a Deck<br>First, create CardInfo objects from your Card objects.<br>Just do a new CardInfo(card, uniqueCount) to create the object.

uniqueCount means how many cards of this type can be in the deck upon creation.<br>A non-positive number signifies it doesn't have a unique count.

Now, bunch them up into a IList<CardInfo> and pass it to DeckInfo when creating the object.<br>

DeckInfo constructor requires an Integer too, signifying how many cards will be in the deck upon creation.

Finally, create a Deck class, passing in the DeckInfo object you have created.

Manipulating the deck <br>You can draw a card withDeck.NextCard().<br> You can peek the next card in the stack wtih Deck.PeekCard().

There are functions for inserting cards into the deck, shuffling the deck and resetting the deck as well.

You can inherit the Deck class if you wish to add more functionality to your custom Deck of cards.


Check Sample Project for the full source code

            // Generate card information first.
            List<CardInfo> cardInfos = new List<CardInfo>();
            // There should only be 1 joker card.
            cardInfos.Add(new CardInfo(new JokerCard(), 1));
            // Fill the rest of the deck with blanks.
            cardInfos.Add(new CardInfo(new BlankCard()));

            // The deck will only have 6 cards, populated with the above card information.
            DeckInfo deckInfo = new DeckInfo(6, cardInfos);
            // Create the deck.
            deck = new Deck(deckInfo);```
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 135 2/12/2022

Initial Release