import Foundation

enum Suit: String, CaseIterable, Codable, Sendable {
    case spades, hearts, diamonds, clubs

    enum Color: Sendable {
        case red, black
    }

    var color: Color {
        switch self {
        case .hearts, .diamonds: .red
        case .spades, .clubs: .black
        }
    }

    var symbol: String {
        switch self {
        case .spades: "♠"
        case .hearts: "♥"
        case .diamonds: "♦"
        case .clubs: "♣"
        }
    }

    var displayName: String {
        rawValue.capitalized
    }
}
