Пример #1
0
        Task IHandleAsync <LoadEventModel> .HandleAsync(LoadEventModel message)
        {
            GamePackageViewModelBinder.ManuelElements.Clear();       //often times i have to add manually.

            GoFishSaveInfo save = cons !.Resolve <GoFishSaveInfo>(); //usually needs this part for multiplayer games.

            _score !.LoadLists(save.PlayerList);
            _playerHandWPF !.LoadList(_model.PlayerHand1 !, ts.TagUsed); // i think
            _discardGPile !.Init(_model.Pile1 !, ts.TagUsed);            // may have to be here (well see)
            _discardGPile.StartListeningDiscardPile();                   // its the main one.

            _deckGPile !.Init(_model.Deck1 !, ts.TagUsed);               // try here.  may have to do something else as well (?)
            _deckGPile.StartListeningMainDeck();

            return(this.RefreshBindingsAsync(_aggregator));
        }
Пример #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);
        }