Пример #1
0
    public int Drop(TLMBCombination lastDroppedCards, string cardsString)
    {
        if (!hand.Contains(cardsString))
        {
            return((int)ErrorCode.TLMB.CARDS_NOT_EXIST);
        }
        else if (!hand.CanDrop(cardsString))
        {
            return((int)ErrorCode.TLMB.CANNOT_DROP);
        }

        if (lastDroppedCards == null || lastDroppedCards.IsEmpty() ||
            TLMBCombination.CanDefeat(new TLMBCombination(cardsString), lastDroppedCards))
        {
            return((int)ErrorCode.TLMB.NULL);
        }

        return((int)ErrorCode.TLMB.CANNOT_DEFEAT);
    }
Пример #2
0
 public static bool CanDefeat(TLMBCombination current, TLMBCombination previous)
 {
     return(current.CanDefeat(previous));
 }
Пример #3
0
	public static bool CanDefeat(TLMBCombination current, TLMBCombination previous) {
		return current.CanDefeat(previous);
	}