コード例 #1
0
ファイル: BlindTests.cs プロジェクト: holyzala/Capstone
        public void BlindPointsTest()
        {
            Blind blind = new Blind();

            blind.AddCard(card1);
            blind.AddCard(card2);
            Assert.AreEqual(2, blind.BlindPoints());
        }
コード例 #2
0
        public int GetPickerScore()
        {
            int total      = 0;
            int pickTricks = 0;

            Rounds.ForEach(round =>
            {
                IPlayer winner = round.Trick.TheWinnerPlayer();
                if (winner == Picker)
                {
                    ++pickTricks;
                }
                if (winner == Picker || winner == Partner)
                {
                    total += round.Trick.TrickValue();
                }
            });
            if (pickTricks > 0)
            {
                total += Blind.BlindPoints();
            }
            return(total);
        }