Ejemplo n.º 1
0
        public List <Card> Draw(CollectionDirection direction, string hash, int count = 1)
        {
            var deck       = repository.GetDeck(hash);
            var drawnCards = cardsHelper.Draw(direction, deck.Cards, count);

            repository.Update(deck);

            return(drawnCards);
        }
Ejemplo n.º 2
0
        public List <Card> Draw(CollectionDirection direction, string hash, string pileHash, int count)
        {
            var deck       = _deckRepository.GetDeck(hash);
            var pile       = deck.Piles.FirstOrDefault(x => x.Hash == pileHash);
            var drawnCards = _cardsHelper.Draw(direction, pile.Cards, count);

            _deckRepository.Update(deck);

            return(drawnCards);
        }