Exemple #1
0
 private void ShuffleCards()
 {
     if (_thisMod !.CanStartNewGameImmediately == false)
     {
         DeckList = new RegularCardsBasicShuffler <SolitaireCard>(); //try to create new one each time if you can't start immediately.
     }
     DeckList.ShuffleObjects();                                      //i think
     CardList = DeckList.ToRegularDeckDict();
     _thisMod.DeckPile !.ClearCards();
     _thisMod.MainDiscardPile !.ClearCards();
     HadOneDeal       = false;
     NoCardsToShuffle = false;
     HowManyCards     = CardList.Count;
     AfterShuffleCards();
 }
Exemple #2
0
        public SolitaireGameClass(ISolitaireData solitaireData1,
                                  ISaveSinglePlayerClass thisState,
                                  IEventAggregator aggregator,
                                  IScoreData score
                                  )                                           //you need the main view model loaded first or will have overflow errors.
        {
            DeckList       = new RegularCardsBasicShuffler <SolitaireCard>(); //i think this should be fine.
            _thisState     = thisState;
            Aggregator     = aggregator;
            _score         = score;
            SaveRoot       = new S(); //i think.
            SolitaireData1 = solitaireData1;
            //can't link then because we don't have the main view model yet.

            //LinkData();
        }