Пример #1
0
        public void ShouldSayIfAllCardsAreTheSameSuit()
        {
            Hand  theHand = new Hand("7H, 8H, 10H, JH, 4H");
            Flush flush   = new Flush();
            var   result  = flush.IsTypeOf(theHand);

            Assert.That(result, Is.EqualTo(true));
        }
Пример #2
0
        public bool IsTypeOf(Hand theHand)
        {
            var straight   = new Straight();
            var flush      = new Flush();
            var isStraight = straight.IsTypeOf(theHand);
            var isFlush    = flush.IsTypeOf(theHand);

            return(isStraight && isFlush);
        }