Reorganise classes

This commit is contained in:
Andrew Cooper
2022-06-18 22:15:05 +10:00
parent ac079fff75
commit fc65452ae6
10 changed files with 307 additions and 288 deletions

View File

@@ -0,0 +1,11 @@
namespace Poker.Cards;
internal record struct Card (Rank Rank, Suit Suit)
{
public override string ToString() => $"{Rank} of {Suit}";
public static bool operator <(Card x, Card y) => x.Rank < y.Rank;
public static bool operator >(Card x, Card y) => x.Rank > y.Rank;
public static int operator -(Card x, Card y) => x.Rank - y.Rank;
}