Пример #1
0
        public void HighestInHandBreaksTie()
        {
            var player1 = new PokerScore(new Rank(RankType.FourOfAKind, Value.Five), Value.A);
            var player2 = new PokerScore(new Rank(RankType.FourOfAKind, Value.Five), Value.K);

            Assert.IsTrue(player1.CompareTo(player2) > 0);
        }
Пример #2
0
        public void StrongerRankWins()
        {
            var player1 = new PokerScore(new Rank(RankType.Straight, Value.Six), Value.Six);
            var player2 = new PokerScore(new Rank(RankType.HighCard, Value.A), Value.A);

            Assert.IsTrue(player1.CompareTo(player2) > 0);
        }
Пример #3
0
        public void HighestInRankWinsOnTiedRank()
        {
            var player1 = new PokerScore(new Rank(RankType.Straight, Value.Six), Value.A);
            var player2 = new PokerScore(new Rank(RankType.Straight, Value.T), Value.J);

            Assert.IsTrue(player1.CompareTo(player2) < 0);
        }
Пример #4
0
        public void IdenticalHandsAreADraw()
        {
            var player1 = new PokerScore(new Rank(RankType.Flush, Value.T), Value.Three);
            var player2 = new PokerScore(new Rank(RankType.Flush, Value.T), Value.Three);

            Assert.AreEqual(0, player1.CompareTo(player2));
        }