public void CheckForWinnerOver500Test()
        {
            var score = new ScoreSheet();
            score.TeamOnePoints = 430;
            score.TeamTwoPoints = 550;

            Assert.IsTrue(score.HasWinner());
        }
        public void CheckForWinnerNoWinnerTest()
        {
            var score = new ScoreSheet();
            score.TeamOnePoints = 499;
            score.TeamTwoPoints = 499;

            Assert.IsFalse(score.HasWinner());
        }
        public void CheckForWinner500ExactlyTest()
        {
            var score = new ScoreSheet();
            score.TeamOnePoints = 500;
            score.TeamTwoPoints = 460;

            Assert.IsTrue(score.HasWinner());
        }
        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);
        }
        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);
        }
Exemple #6
0
 public Game()
 {
     Deck       = new Deck();
     ScoreSheet = new ScoreSheet();
 }
Exemple #7
0
        public bool CheckForWinner()
        {
            var hasWinner = ScoreSheet.HasWinner();

            return(hasWinner);
        }
Exemple #8
0
 public void RecordScores(Hand hand)
 {
     ScoreSheet.ScoreHand(hand);
 }
Exemple #9
0
 public Game()
 {
     Deck = new Deck();
     ScoreSheet = new ScoreSheet();
 }