public void LoadFromHandCardValues(GoFishPlayerItem thisPlayer) //its smart enough to take their hand part
        {
            var thisList = thisPlayer.MainHandList.GroupBy(items => items.Value).Select(Items => Items.Key).ToCustomBasicList();
            CustomBasicList <NumberPieceCP> TempList = new CustomBasicList <NumberPieceCP>();

            thisList.ForEach(items =>
            {
                IEnumPiece <EnumCardValueList> thisPiece = new NumberPieceCP();
                thisPiece.EnumValue  = items;
                thisPiece.IsEnabled  = IsEnabled;
                thisPiece.IsSelected = false;
                TempList.Add((NumberPieceCP)thisPiece);
            });
            ItemList.ReplaceRange(TempList);
        }
示例#2
0
        public CustomBasicList <RegularSimpleCard> PairToPlay(GoFishSaveInfo saveRoot)
        {
            GoFishPlayerItem singleInfo = saveRoot.PlayerList.GetWhoPlayer();
            CustomBasicList <RegularSimpleCard> output = new CustomBasicList <RegularSimpleCard>();

            foreach (var firstCard in singleInfo.MainHandList)
            {
                foreach (var secondCard in singleInfo.MainHandList)
                {
                    if (firstCard.Deck != secondCard.Deck)
                    {
                        if (firstCard.Value == secondCard.Value)
                        {
                            output.Add(firstCard);
                            output.Add(secondCard);
                            return(output);
                        }
                    }
                }
            }
            return(new CustomBasicList <RegularSimpleCard>());
        }
示例#3
0
        public EnumCardValueList NumberToAsk(GoFishSaveInfo saveRoot)
        {
            GoFishPlayerItem singleInfo = saveRoot.PlayerList.GetWhoPlayer();

            return(singleInfo.MainHandList.GetRandomItem().Value);
        }