protected override void AfterRemovingFromLastPile(int Lasts)
 {
     if (Piles.HasCardInColumn(Lasts) || GlobalClass.MainModel !.Heel1.IsEndOfDeck())
     {
         return;
     }
     Piles.AddCardToColumn(Lasts, GlobalClass.MainModel.Heel1.DrawCard());
 }
 public override bool CanAddSingleCard(int whichOne, SolitaireCard thisCard)
 {
     if (Piles.HasCardInColumn(whichOne) == false && GlobalClass.MainModel !.Heel1.IsEndOfDeck())
     {
         return(true);
     }
     return(Piles.HasCardInColumn(whichOne) == false && GlobalClass.MainModel !.Heel1 !.CardsLeft() == 1);
 }
Пример #3
0
        public override bool CanAddSingleCard(int whichOne, SolitaireCard thisCard)
        {
            if (Piles.HasCardInColumn(whichOne) == false)
            {
                return(true);
            }
            var prevCard = Piles.GetLastCard(PreviousSelected);

            return(prevCard.Value - 1 == thisCard.Value && prevCard.Color == thisCard.Color);
        }
        public override bool CanAddSingleCard(int whichOne, SolitaireCard thisCard)
        {
            if (Piles.HasCardInColumn(whichOne) == false)
            {
                return(thisCard.Value == EnumCardValueList.King);
            }
            var prevCard = Piles.GetLastCard(whichOne);

            return(prevCard.Value - 1 == thisCard.Value && prevCard.Color != thisCard.Color);
        }
        public override bool CanAddSingleCard(int whichOne, SolitaireCard thisCard)
        {
            if (Piles.HasCardInColumn(whichOne) == false)
            {
                return(true);
            }
            var oldCard = Piles.GetLastCard(whichOne);

            return(oldCard.Value - 1 == thisCard.Value && oldCard.Color != thisCard.Color);
        }
 protected override void AfterRemovingFromLastPile(int Lasts)
 {
     if (Piles.HasCardInColumn(Lasts) || GlobalClass.MainModel !.Heel1 !.IsEndOfDeck() || GlobalClass.MainModel.Heel1.CardsLeft() == 1)
     {
         return;
     }
     Piles.AddCardToColumn(Lasts, GlobalClass.MainModel.Heel1.DrawCard());
     if (GlobalClass.MainModel.Heel1.CardsLeft() == 1)
     {
         GlobalClass.MainModel.Heel1.DeckStyle = DeckObservablePile <SolitaireCard> .EnumStyleType.AlwaysKnown;
     }
 }
        public override bool CanMoveToAnotherPile(int whichOne)
        {
            SolitaireCard newCard;
            SolitaireCard oldCard;

            if (Piles.HasCardInColumn(whichOne) == false)
            {
                return(false);// cannot move because the empty piles are never filled
            }
            oldCard = Piles.GetLastCard(whichOne);
            newCard = GetCard(); // i think
            return(oldCard.Value - 1 == newCard.Value);
        }
        public override bool CanAddSingleCard(int whichOne, SolitaireCard thisCard)
        {
            if (Piles.HasCardInColumn(whichOne) == false)
            {
                if (GlobalClass.MainModel !.Heel1.IsEndOfDeck() == false)
                {
                    throw new BasicBlankException("If its not at the end of the deck; a card needs to be placed");
                }
                return(true);
            }
            var prevCard = Piles.GetLastCard(whichOne);

            return(prevCard.Value - 1 == thisCard.Value && prevCard.Suit != thisCard.Suit);
        }
        public override bool CanAddSingleCard(int whichOne, SolitaireCard thisCard)
        {
            if (Piles.HasCardInColumn(whichOne) == false)
            {
                return(thisCard.Value == EnumCardValueList.King);
            }
            var oldCard = Piles.GetLastCard(whichOne);

            if (thisCard.Suit != oldCard.Suit)
            {
                return(false);
            }
            return(oldCard.Value - 1 == thisCard.Value);
        }
Пример #10
0
 public void RemoveCards(int whichOne)
 {
     if (TempList.Count != 13)
     {
         throw new BasicBlankException("Must have 13 cards to remove the 13 cards");
     }
     TempList.ForEach(tempCard => Piles.RemoveSpecificCardFromColumn(whichOne, tempCard.Deck));
     if (Piles.HasCardInColumn(whichOne))
     {
         var thisCard = Piles.GetLastCard(whichOne);
         Piles.RemoveFromUnknown(thisCard);
     }
     UnselectAllColumns();
 }
        public override bool CanMoveToAnotherPile(int whichOne)
        {
            if (PreviousSelected == -1)
            {
                throw new BasicBlankException("There was no card selected");
            }
            if (Piles.HasCardInColumn(whichOne) == false)
            {
                return(true);
            }
            var oldCard = Piles.GetLastCard(whichOne);
            var newCard = Piles.GetLastCard(PreviousSelected);

            return(newCard.Value + 1 == oldCard.Value);
        }
Пример #12
0
        public override bool CanMoveToAnotherPile(int whichOne)
        {
            if (Piles.HasCardInColumn(whichOne) == false)
            {
                return(true);
            }
            var oldCard = Piles.GetLastCard(whichOne);
            var newCard = GetCard();

            if (oldCard.Value == EnumCardValueList.LowAce && newCard.Value == EnumCardValueList.King)
            {
                return(true); // because round corner.
            }
            return(oldCard.Value - 1 == newCard.Value);
        }