Пример #1
0
 public bool ScoreChance()
 {
     if (!HasScoredChance)
     {
         savedScores.Chance = possibleScoreboard.Chance;
         dice = new YahtzeeDice();
         possibleScoreboard = new YahtzeeScoreboard(dice.getDiceValues());
         HasScoredChance    = true;
         return(true);
     }
     return(false);
 }
Пример #2
0
 public bool ScoreFourOfAKind()
 {
     if (!HasScoredFourOfAKind)
     {
         savedScores.FourOfAKind = possibleScoreboard.FourOfAKind;
         dice = new YahtzeeDice();
         possibleScoreboard   = new YahtzeeScoreboard(dice.getDiceValues());
         HasScoredFourOfAKind = true;
         return(true);
     }
     return(false);
 }
Пример #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);
 }
Пример #4
0
 public bool ScoreSixes()
 {
     if (!HasScoredSixes)
     {
         savedScores.Sixes = possibleScoreboard.Sixes;
         dice = new YahtzeeDice();
         possibleScoreboard = new YahtzeeScoreboard(dice.getDiceValues());
         HasScoredSixes     = true;
         return(true);
     }
     return(false);
 }
Пример #5
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;
 }