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); }
public Game() { Deck = new Deck(); ScoreSheet = new ScoreSheet(); }
public bool CheckForWinner() { var hasWinner = ScoreSheet.HasWinner(); return(hasWinner); }
public void RecordScores(Hand hand) { ScoreSheet.ScoreHand(hand); }