Ejemplo 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);
        }
Ejemplo n.º 2
0
 public CardHolder(CardHolderDto dto)
 {
     ActiveCards   = new ActiveCardRepository(dto.ActiveCards);
     InactiveCards = new InactiveCardRepository(dto.InactiveCards);
 }
Ejemplo n.º 3
0
 public CardHolder(ActiveCardRepository activeCards, InactiveCardRepository inactiveCards)
 {
     ActiveCards   = activeCards;
     InactiveCards = inactiveCards;
 }
Ejemplo n.º 4
0
 public CardHolder()
 {
     ActiveCards   = new ActiveCardRepository();
     InactiveCards = new InactiveCardRepository();
 }
Ejemplo 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);


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