public BlackJackData(Card c) { if (c != null) { m_suit = (int)c.Suit(); m_id = c.CardId(); m_internalDeckId = 10; m_isTurned = false; m_z = c.m_z; m_value = 0; if (c.CardId() > 1 && c.CardId() < 11) { m_value = c.CardId(); } else { if (c.CardId() > 10) { m_value = 10; } if (c.CardId() == 1) { m_value = 11; } } } }
/// <summary> /// create Black Jack data from Card /// </summary> /// <param name="card"></param> /// <param name="internalDeckId"></param> public void AddCardData(Card card, int internalDeckId) { m_suit = (int)card.Suit(); m_id = card.CardId(); m_isTurned = card.IsTurned(); m_internalDeckId = internalDeckId; m_z = card.m_z; m_value = ComputeCardValue(card); }