Added MultipleDeck which can be used in place of the old QuadDeck, converted cards from classes to records as it is useful to have default equality checks.

This commit is contained in:
Kwoth
2022-07-23 07:43:18 +02:00
parent ccf92ca702
commit 967784c860
6 changed files with 62 additions and 46 deletions

View File

@@ -2,4 +2,14 @@
public sealed class RegularDeck : NewDeck<RegularCard, RegularSuit, RegularValue>
{
public RegularDeck()
{
foreach (var suit in _suits)
{
foreach (var val in _values)
{
_cards.AddLast((RegularCard)Activator.CreateInstance(typeof(RegularCard), suit, val)!);
}
}
}
}