mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 04:15:45 -08:00
12 lines
346 B
C#
12 lines
346 B
C#
namespace Poker;
|
|
|
|
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;
|
|
}
|