Esempio n. 1
0
        private void InitCardHolder(GameStorage gameStorage)
        {
            var level1 = ConvertCardDtoListToCardList(gameStorage.Level1Cards);
            var level2 = ConvertCardDtoListToCardList(gameStorage.Level2Cards);
            var level3 = ConvertCardDtoListToCardList(gameStorage.Level3Cards);

            var shuffler = new Shuffler <Card>();

            var shuffle1 = shuffler.Shuffle(level1);
            var shuffle2 = shuffler.Shuffle(level2);
            var shuffle3 = shuffler.Shuffle(level3);

            var inactiveCardsRepository = new InactiveCardRepository(shuffle1, shuffle2, shuffle3);

            var activeCardsRepository = new ActiveCardRepository();

            CardHolder = new CardHolder(activeCardsRepository, inactiveCardsRepository);
        }
Esempio n. 2
0
 public CardHolder(CardHolderDto dto)
 {
     ActiveCards   = new ActiveCardRepository(dto.ActiveCards);
     InactiveCards = new InactiveCardRepository(dto.InactiveCards);
 }
Esempio n. 3
0
 public CardHolder(ActiveCardRepository activeCards, InactiveCardRepository inactiveCards)
 {
     ActiveCards   = activeCards;
     InactiveCards = inactiveCards;
 }
Esempio n. 4
0
 public CardHolder()
 {
     ActiveCards   = new ActiveCardRepository();
     InactiveCards = new InactiveCardRepository();
 }
Esempio n. 5
0
        private void InitCardHolder(GameStorage gameStorage)
        {
            var level1 = ConvertCardDtoListToCardList(gameStorage.Level1Cards);
            var level2 = ConvertCardDtoListToCardList(gameStorage.Level2Cards);
            var level3 = ConvertCardDtoListToCardList(gameStorage.Level3Cards);

            var shuffler = new Shuffler<Card>();

            var shuffle1 = shuffler.Shuffle(level1);
            var shuffle2 = shuffler.Shuffle(level2);
            var shuffle3 = shuffler.Shuffle(level3);

            var inactiveCardsRepository = new InactiveCardRepository(shuffle1, shuffle2, shuffle3);

            var activeCardsRepository = new ActiveCardRepository();

            CardHolder = new CardHolder(activeCardsRepository, inactiveCardsRepository);


        }
Esempio n. 6
0
 public CardHolder(CardHolderDto dto)
 {
     ActiveCards = new ActiveCardRepository(dto.ActiveCards);
     InactiveCards = new InactiveCardRepository(dto.InactiveCards);
 }
Esempio n. 7
0
 public CardHolder(ActiveCardRepository activeCards, InactiveCardRepository inactiveCards)
 {
     ActiveCards = activeCards;
     InactiveCards = inactiveCards;
 }
Esempio n. 8
0
 public CardHolder()
 {
     ActiveCards = new ActiveCardRepository();
     InactiveCards = new InactiveCardRepository();
 }