Exemple #1
0
    /// <summary>
    /// Determines whether this instance is ready to join zone the specified target.
    /// </summary>
    /// <returns><c>true</c> if this instance is ready to join zone the specified target; otherwise, <c>false</c>.</returns>
    /// <param name="target">Target.</param>
    public bool IsReadyToJoinZone(CardDataProperties target, bool IsTargetBiggerThan = false, bool IsSameColor = true)
    {
        if (IsTargetBiggerThan)
        {
            // TODO: Check if this card has the value smaller than target and has the same card type.
            if (properties.GetCardValue() == target.GetCardValue() + 1)
            {
                if (!IsSameColor)
                {
                    if (!IsSameColorCard(target.GetCardType()))
                    {
                        return(true);
                    }
                }
                else
                {
                    if (properties.GetCardType() == target.GetCardType())
                    {
                        // TODO: Return true if this condition is true.
                        return(true);
                    }
                }
            }
        }
        else
        {
            // TODO: Check if this card has the value smaller than target and has the same card type.
            if (properties.GetCardValue() == target.GetCardValue() - 1)
            {
                if (!IsSameColor)
                {
                    if (!IsSameColorCard(target.GetCardType()))
                    {
                        return(true);
                    }
                }
                else
                {
                    if (properties.GetCardType() == target.GetCardType())
                    {
                        // TODO: Return true if this condition is true.
                        return(true);
                    }
                }
            }
        }

        // TODO: Return false.
        return(false);
    }
Exemple #2
0
 /// <summary>
 /// Get the type of the card.
 /// </summary>
 /// <value>The type of the card.</value>
 public Enums.CardType GetTypeCards()
 {
     // TODO: return the type of card from data.
     return(properties.GetCardType());
 }