コード例 #1
0
 public void TestFourOfAKindAlt_MultiUseCategory_ThrowsException()
 {
     DieSet dieSet = new DieSet(1, 1, 2, 3, 1);
     ScoringCategory fourKindAlt = new FourOfAKindAltCategory();
     int score = fourKindAlt.Score(dieSet.getCount());
     score = fourKindAlt.Score(dieSet.getCount());
 }
コード例 #2
0
 public void TestFourOfAKindAltNoScore()
 {
     DieSet die = new DieSet(1, 2, 3, 4, 5);
     ScoringCategory fourKindAlt = new FourOfAKindAltCategory();
     int score = fourKindAlt.CalculateScoreForRoll(die.getCount());
     Assert.IsTrue(score == 0);
 }
コード例 #3
0
 public void TestScoreFourOfAKindAlt()
 {
     DieSet die = new DieSet(6, 6, 1, 6, 6);
     ScoringCategory fourKindAlt = new FourOfAKindAltCategory();
     Assert.IsTrue(fourKindAlt.Name == "Four of a Kind");
     Assert.IsTrue(fourKindAlt.HasBeenUsed == false);
     Assert.IsTrue(fourKindAlt.Lower);
     Assert.IsFalse(fourKindAlt.Upper);
     fourKindAlt.Score(die.getCount());
     Assert.IsTrue(fourKindAlt.HasBeenUsed == true);
     Assert.IsTrue(fourKindAlt.FinalScore == 24);
 }
コード例 #4
0
 public void TestFourOfAKindAltRules()
 {
     ScoringCategory fourKindAlt = new FourOfAKindAltCategory();
     Assert.AreEqual("Four of a Kind: If there are four matching dice, score the total of those four dice.  Otherwise, score 0.", fourKindAlt.getRules());
 }