Beispiel #1
0
        public void AddCard(int deck, bool isSelected = false)
        {
            MonopolyCardGameCardInformation thisCard;

            thisCard            = _gameContainer.DeckList !.GetSpecificItem(deck);
            thisCard.IsSelected = isSelected;
            HandList.Add(thisCard); // not sure about scroll to bottom (?)
            ScrollToBottom();       // might as well.
        }
        private void PutBackHand(int decks)
        {
            var thisDomino = _mainGame !.SingleInfo !.MainHandList.GetSpecificItem(decks);

            _viewModel.PrivateTrain1 !.HandList.Add(thisDomino);
            _mainGame.SingleInfo.LongestTrainList.Add(thisDomino);
            thisDomino.IsSelected = false;
            _mainGame.SingleInfo.MainHandList.RemoveObjectByDeck(decks);
            _viewModel.UpdateCount(_mainGame.SingleInfo);
        }
 public void AddCard(RegularRummyCard thisCard, int position)
 {
     thisCard.IsSelected = false;
     thisCard.Drew       = true; //others has to know what was played.
     thisCard.Player     = _gameContainer.WhoTurn;
     if (position == 1)
     {
         HandList.InsertBeginning(thisCard);
     }
     else
     {
         HandList.Add(thisCard);
     }
 }
        public void AddCard(MonasteryCardInfo thisCard, int position)
        {
            var newCard   = GetCard(thisCard, position);
            var finalCard = new MonasteryCardInfo();

            finalCard.Populate(newCard.Deck);
            finalCard.Deck = thisCard.Deck; //i think
            if (position == 1)
            {
                HandList.InsertBeginning(finalCard);
            }
            else
            {
                HandList.Add(finalCard);
            }
        }
        public void AddCard(ChinazoCard thisCard, int position)
        {
            thisCard.IsSelected = false;
            thisCard.Drew       = false;
            int newPosition = PositionToPlay(thisCard, position);

            if (newPosition == 1)
            {
                if (_whatSet == RummyProcesses <EnumSuitList, EnumColorList, ChinazoCard> .EnumRummyType.Runs)
                {
                    if (thisCard.IsObjectWild == true)
                    {
                        thisCard.UsedAs = HandList.First().UsedAs - 1;
                    }
                    if (thisCard.UsedAs == 14)
                    {
                        throw new BasicBlankException("Ace cannot be used as 14 when its low.");
                    }
                    _firstNumber = thisCard.UsedAs;
                }
                HandList.InsertBeginning(thisCard);
            }
            else
            {
                if (_whatSet == RummyProcesses <EnumSuitList, EnumColorList, ChinazoCard> .EnumRummyType.Runs)
                {
                    if (thisCard.IsObjectWild == true)
                    {
                        thisCard.UsedAs = HandList.Last().UsedAs + 1;
                        if (thisCard.UsedAs > 14)
                        {
                            throw new BasicBlankException("Use as can never be higher than 14 ever");
                        }
                    }
                }
                HandList.Add(thisCard);
            }
            if (_whatSet == RummyProcesses <EnumSuitList, EnumColorList, ChinazoCard> .EnumRummyType.Runs)
            {
                RepopulateCards();
            }
        }
        public void AddCard(GalaxyCardGameCardInformation thisCard)
        {
            GalaxyCardGameCardInformation originalCard = HandList.First();

            thisCard.Drew       = false;
            thisCard.IsSelected = false;
            if (WhatSet == EnumWhatSets.Kinds)
            {
                HandList.Add(thisCard);
                return;
            }
            if ((int)thisCard.Value == (int)originalCard.Value - 1)
            {
                HandList.InsertBeginning(thisCard);
            }
            else
            {
                HandList.Add(thisCard);
            }
        }
 public void AddCard(Phase10CardInformation thisCard, int position)
 {
     thisCard.IsSelected = false;
     thisCard.Drew       = false;
     if (position == 1)
     {
         if (_whatSet == EnumWhatSets.Runs && thisCard.CardCategory == EnumCardCategory.Wild)
         {
             thisCard.Number = HandList.First().Number - 1;
         }
         HandList.InsertBeginning(thisCard);
     }
     else
     {
         if (_whatSet == EnumWhatSets.Runs && thisCard.CardCategory == EnumCardCategory.Wild)
         {
             thisCard.Number = HandList.Last().Number + 1;
         }
         HandList.Add(thisCard);
     }
 }
 public void HitMe(BlackjackCardInfo thisCard, ref bool hasChoice)
 {
     if (thisCard.Value == EnumCardValueList.LowAce) //decided to make it low now.
     {
         hasChoice       = true;
         thisCard.Points = 0;
     }
     else
     {
         hasChoice = false;
         if ((int)thisCard.Value > 9)
         {
             thisCard.Points = 10;
         }
         else
         {
             thisCard.Points = (int)thisCard.Value;
         }
     }
     MainCard = thisCard;
     HandList.Add(thisCard);
 }
Beispiel #9
0
        public void AddTile(TileInfo thisTile, int position)
        {
            TileRummySaveInfo saveRoot = cons !.Resolve <TileRummySaveInfo>();

            thisTile.Drew       = true; // this should be okay so others can tell something was added to it.
            thisTile.IsSelected = false;
            saveRoot.TilesFromField.RemoveSpecificItem(thisTile.Deck);
            if (((int)_setType == (int)EnumWhatSets.Runs) & (thisTile.IsJoker == true))
            {
                TileInfo newTile;
                if (position == 1)
                {
                    newTile         = HandList.First();
                    thisTile.Number = newTile.Number - 1;
                    HandList.InsertBeginning(thisTile);
                }
                else
                {
                    newTile         = HandList.Last();
                    thisTile.Number = newTile.Number + 1;
                    HandList.Add(thisTile);
                }
            }
            else
            {
                HandList.Add(thisTile);
            }

            if ((int)_setType == (int)EnumWhatSets.Runs)
            {
                var TempList = (from Items in HandList
                                orderby Items.Number
                                select Items).ToList();
                HandList.ReplaceRange(TempList);
            }
        }
Beispiel #10
0
 public void AddToDiscard(RegularRummyCard thisCard)
 {
     thisCard.Drew       = false;
     thisCard.IsSelected = false;
     HandList.Add(thisCard);
 }
Beispiel #11
0
 public void AddCard(LifeCardGameCardInformation thisCard)
 {
     thisCard.IsSelected = false;
     thisCard.Drew       = false;
     HandList.Add(thisCard);
 }
Beispiel #12
0
 public void AddCard(SolitaireCard thisCard) => HandList.Add(thisCard);
Beispiel #13
0
 public void AddCard(RegularRummyCard thisCard)
 {
     UpdateCard(thisCard);
     HandList.Add(thisCard);
 }