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)); }
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>()); }
public EnumCardValueList NumberToAsk(GoFishSaveInfo saveRoot) { GoFishPlayerItem singleInfo = saveRoot.PlayerList.GetWhoPlayer(); return(singleInfo.MainHandList.GetRandomItem().Value); }