//
//  Card+Baccarat.swift
//  Baccarat
//
//  Baccarat-specific card value extensions.
//

import CasinoKit

extension Rank {
    /// The baccarat point value of this rank.
    /// Ace = 1, 2-9 = face value, 10/J/Q/K = 0.
    var baccaratValue: Int {
        switch self {
        case .ace: return 1
        case .two, .three, .four, .five, .six, .seven, .eight, .nine:
            return rawValue
        case .ten, .jack, .queen, .king:
            return 0
        }
    }
}

extension Card {
    /// The baccarat point value of this card.
    var baccaratValue: Int {
        rank.baccaratValue
    }
}

