Added .GetName extension method which will show human readable hand values in text. Also completely moved .betdraw the the new deck implementation. A renamed to Ace

This commit is contained in:
Kwoth
2022-07-23 04:52:40 +02:00
parent c20b851dc7
commit ccf92ca702
7 changed files with 50 additions and 23 deletions

View File

@@ -39,8 +39,16 @@ public abstract class NewDeck<TCard, TSuit, TValue>
return null;
}
public virtual TCard? Peek()
=> _cards.First?.Value;
public virtual TCard? Peek(int x = 0)
{
var card = _cards.First;
for (var i = 0; i < x; i++)
{
card = card?.Next;
}
return card?.Value;
}
public virtual void Shuffle()
{