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


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