public bool IsLegalAdd(Card card) { if (card.isFaceDown == true) { return true; } else if (this.IsEmpty) { if (card.Rank == Rank.King) { return true; } return false; } else if (card.Suit == Suit.Clubs || card.Suit == Suit.Spades) { if ((this.TopCard.Suit == Suit.Hearts || this.TopCard.Suit == Suit.Diamonds) && this.TopCard.Rank == card.Rank + 1) { return true; } return false; } else { if ((this.TopCard.Suit == Suit.Clubs || this.TopCard.Suit == Suit.Spades) && this.TopCard.Rank == card.Rank + 1) { return true; } return false; } }
public bool IsLegalAdd(Card card) { if (this.IsEmpty) { if (card.Rank == Rank.Ace) { return true; } return false; } if (this.TopCard.Suit == card.Suit) { if (this.TopCard.Rank == card.Rank - 1) { return true; } return false; } return false; }
public override void AddCard(Card card) { base.AddCard(card); if (card.isFaceDown) { card.Position = new Vector2(location.X, location.Y + (10 * this.Cards.IndexOf(card))); } else if (Cards.Count > 1) { if (Cards[Cards.IndexOf(card) - 1].isFaceDown == true) { card.Position = new Vector2(location.X, location.Y + (10 * this.Cards.IndexOf(card))); } else { card.Position = new Vector2(location.X, Cards[Cards.IndexOf(card) - 1].Position.Y + 25); } } else { card.Position = location; } }
public virtual void AddCard(Card card) { Cards.Add(card); }
public override void AddCard(Card card) { base.AddCard(card); card.Position = new Vector2(location.X + (Cards.IndexOf(card) * .3f), 50 - (Cards.IndexOf(card) * .3f)); }
public override void AddCard(Card card) { base.AddCard(card); }
public void AddFromDeck(Card card, Deck FromDeck) { LastDeck = FromDeck; base.AddCard(card); }
public override void AddCard(Card card) { throw new InvalidOperationException("Please use AddFromDeck(Card card, Deck FromDeck) instead"); }
public override void AddCard(Card card) { card.isFaceDown = true; base.AddCard(card); }