Пример #1
0
        public void ScoreHandTenForTwoHundredTookElevenTest()
        {
            var hand = new Hand(null, null);
            hand.Bid = new Bid() { PlayerFourBid = 7, PlayerOneBid = 2, PlayerTwoBid = 3, PlayerThreeBid = 1 };
            hand.TeamOneTrickCount = 2;
            hand.TeamTwoTrickCount = 11;

            var score = new ScoreSheet();
            score.ScoreHand(hand);

            Assert.AreEqual(-30, score.TeamOnePoints);
            Assert.AreEqual(200, score.TeamTwoPoints);
        }
Пример #2
0
        public void ScoreHandBagOutTest()
        {
            var hand = new Hand(null, null);
            hand.Bid = new Bid() { PlayerFourBid = 3, PlayerOneBid = 3, PlayerTwoBid = 3, PlayerThreeBid = 3 };
            hand.TeamOneTrickCount = 9;
            hand.TeamTwoTrickCount = 4;

            var score = new ScoreSheet();
            score.TeamOneBags = 9;
            score.ScoreHand(hand);

            Assert.AreEqual(-40, score.TeamOnePoints);
            Assert.AreEqual(0, score.TeamOneBags);
        }
Пример #3
0
        public void PlayHands()
        {
            while(CheckForWinner() == false)
            {
                ChangeDealer();

                var hand = new Hand(_players, Deck);

                _hands.Add(hand);

                RecordScores(hand);
            }
        }
Пример #4
0
 public void RecordScores(Hand hand)
 {
     ScoreSheet.ScoreHand(hand);
 }
Пример #5
0
 public void CreateHandTest()
 {
     var hand = new Hand(Players, Deck);
     Assert.IsNotNull(hand);
 }
Пример #6
0
 public Trick(Hand hand)
 {
     _hand = hand;
     PlayedCards = new Dictionary<PlayerMetadata, Card>();
 }