public void Match() { _dealer.Shuffle(); if (!_dealer.PeekAtDeck()) { throw new Exception("No Cards in Deck"); } var lastCard = _dealer.Deal(); var cards = new List <Card>() { lastCard }; while (_dealer.PeekAtDeck()) { var card = _dealer.Deal(); cards.Add(card); if (_matchCondition.IsMatch(lastCard, card)) { if (_rdm.Next(2) == 1) { _player1.GiveCards(cards); } else { _player2.GiveCards(cards); } if (!_dealer.PeekAtDeck()) { break; } lastCard = _dealer.Deal(); cards = new List <Card>() { lastCard }; } else { lastCard = card; } } }