Kunc.RiotGames.Lor.DeckCodes
0.3.1
Prefix Reserved
dotnet add package Kunc.RiotGames.Lor.DeckCodes --version 0.3.1
NuGet\Install-Package Kunc.RiotGames.Lor.DeckCodes -Version 0.3.1
<PackageReference Include="Kunc.RiotGames.Lor.DeckCodes" Version="0.3.1" />
paket add Kunc.RiotGames.Lor.DeckCodes --version 0.3.1
#r "nuget: Kunc.RiotGames.Lor.DeckCodes, 0.3.1"
// Install Kunc.RiotGames.Lor.DeckCodes as a Cake Addin #addin nuget:?package=Kunc.RiotGames.Lor.DeckCodes&version=0.3.1 // Install Kunc.RiotGames.Lor.DeckCodes as a Cake Tool #tool nuget:?package=Kunc.RiotGames.Lor.DeckCodes&version=0.3.1
Kunc.RiotGames.Lor.DeckCodes
This is a C# implementation of the C# library RiotGames/LoRDeckCodes. This library is faster and more efficient (at least 50% less memory allocation).
How to Use
var deckEncoder = new LorDeckEncoder();
var deck1 = new List<DeckItem>()
{
new() { CardCode = "01DE002", Count = 4 },
new() { CardCode = "02BW003", Count = 2 },
new() { CardCode = "02BW010", Count = 3 },
...
}
string code = deckEncoder.GetCodeFromDeck(deck1);
List<DeckCard> deck2 = deckEncoder.GetDeckFromCode<DeckCard>(code);
You can also use your own class, all you have to do is implement 2 interface
IDeckCard
- to get deck from code
IReadOnlyDeckCard
- to get the code from the deck
class MyCard : IDeckItem, IReadOnlyDeckItem
{
public string CardCode { get; set; }
public int Count { get; set; }
// ...
}
var deckEncoder = new LorDeckEncoder();
List<MyCard> deck = deckEncoder.GetDeckFromCode<MyCard>("SomeCode");
string code = deckEncoder.GetCodeFromDeck(deck);
Disclaimer
Kunc.RiotGames.Lor.DeckCodes
isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games, and all associated properties are trademarks or registered trademarks of Riot Games, Inc.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- 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.