Beispiel #1
0
 public void Roll()
 {
     if (dice.NumberOfRolls < 3)
     {
         dice.Roll();
         possibleScoreboard = new YahtzeeScoreboard(dice.getDiceValues());
     }
 }
Beispiel #2
0
 public bool ScoreChance()
 {
     if (!HasScoredChance)
     {
         savedScores.Chance = possibleScoreboard.Chance;
         dice = new YahtzeeDice();
         possibleScoreboard = new YahtzeeScoreboard(dice.getDiceValues());
         HasScoredChance    = true;
         return(true);
     }
     return(false);
 }
Beispiel #3
0
 public bool ScoreLargeStraight()
 {
     if (!HasScoredLargeStraight)
     {
         savedScores.LargeStraight = possibleScoreboard.LargeStraight;
         dice = new YahtzeeDice();
         possibleScoreboard     = new YahtzeeScoreboard(dice.getDiceValues());
         HasScoredLargeStraight = true;
         return(true);
     }
     return(false);
 }
Beispiel #4
0
 public bool ScoreFourOfAKind()
 {
     if (!HasScoredFourOfAKind)
     {
         savedScores.FourOfAKind = possibleScoreboard.FourOfAKind;
         dice = new YahtzeeDice();
         possibleScoreboard   = new YahtzeeScoreboard(dice.getDiceValues());
         HasScoredFourOfAKind = true;
         return(true);
     }
     return(false);
 }
Beispiel #5
0
 public bool ScoreSixes()
 {
     if (!HasScoredSixes)
     {
         savedScores.Sixes = possibleScoreboard.Sixes;
         dice = new YahtzeeDice();
         possibleScoreboard = new YahtzeeScoreboard(dice.getDiceValues());
         HasScoredSixes     = true;
         return(true);
     }
     return(false);
 }
Beispiel #6
0
 public YahtzeeGame()
 {
     dice = new YahtzeeDice();
     possibleScoreboard     = new YahtzeeScoreboard(dice.getDiceValues());
     savedScores            = new YahtzeeScoreboard();
     HasScoredOnes          = false;
     HasScoredTwos          = false;
     HasScoredThrees        = false;
     HasScoredFours         = false;
     HasScoredFives         = false;
     HasScoredSixes         = false;
     HasScoredThreeOfAKind  = false;
     HasScoredFourOfAKind   = false;
     HasScoredFullHouse     = false;
     HasScoredSmallStraight = false;
     HasScoredLargeStraight = false;
     HasScoredYahtzee       = false;
     HasScoredChance        = false;
 }