コード例 #1
0
 void IYahtzeeStyle.PopulateBottomScores()
 {
     if (_scoreContainer.HasKind(3) == true && _scoreContainer.RowList[9].HasFilledIn() == false)
     {
         _scoreContainer.RowList[9].Possible = _scoreContainer.CalculateDiceTotal();
     }
     if (_scoreContainer.HasKind(4) == true && _scoreContainer.RowList[10].HasFilledIn() == false)
     {
         _scoreContainer.RowList[10].Possible = _scoreContainer.CalculateDiceTotal();
     }
     if (_scoreContainer.HasFullHouse() == true && _scoreContainer.RowList[11].HasFilledIn() == false)
     {
         _scoreContainer.RowList[11].Possible = 25;
     }
     if (_scoreContainer.HasStraight(true) == true && _scoreContainer.RowList[12].HasFilledIn() == false)
     {
         _scoreContainer.RowList[12].Possible = 30;
     }
     if (_scoreContainer.HasStraight(false) == true && _scoreContainer.RowList[13].HasFilledIn() == false)
     {
         _scoreContainer.RowList[13].Possible = 40;
     }
     if (_scoreContainer.HasAllFive() == true && _scoreContainer.RowList[14].HasFilledIn() == false)
     {
         _scoreContainer.RowList[14].Possible = 50;
     }
     if (_scoreContainer.RowList[15].HasFilledIn() == false)
     {
         _scoreContainer.RowList[15].Possible = _scoreContainer.CalculateDiceTotal();
     }
 }
コード例 #2
0
 void IYahtzeeStyle.PopulateBottomScores()
 {
     if (HasTwoPairSameColor() == true && _scoreContainer.RowList[9].HasFilledIn() == false)
     {
         _scoreContainer.RowList[9].Possible = _scoreContainer.CalculateDiceTotal();
     }
     if (_scoreContainer.HasKind(3) == true && _scoreContainer.RowList[10].HasFilledIn() == false)
     {
         _scoreContainer.RowList[10].Possible = _scoreContainer.CalculateDiceTotal();
     }
     if (_scoreContainer.HasStraight(false) == true && _scoreContainer.RowList[11].HasFilledIn() == false)
     {
         _scoreContainer.RowList[11].Possible = 30;// for now; has to be large.  will later test for small
     }
     if (HasFlush() == true && _scoreContainer.RowList[12].HasFilledIn() == false)
     {
         _scoreContainer.RowList[12].Possible = 35;
     }
     if (_scoreContainer.HasFullHouse() == true && _scoreContainer.RowList[13].HasFilledIn() == false)
     {
         _scoreContainer.RowList[13].Possible = _scoreContainer.CalculateDiceTotal() + 15;
     }
     if (_scoreContainer.HasFullHouse() == true && HasFlush() == true && _scoreContainer.RowList[14].HasFilledIn() == false)
     {
         _scoreContainer.RowList[14].Possible = _scoreContainer.CalculateDiceTotal() + 20;
     }
     if (_scoreContainer.HasKind(4) == true && _scoreContainer.RowList[15].HasFilledIn() == false)
     {
         _scoreContainer.RowList[15].Possible = _scoreContainer.CalculateDiceTotal() + 25;
     }
     if (_scoreContainer.RowList[16].HasFilledIn() == false)
     {
         _scoreContainer.RowList[16].Possible = _scoreContainer.CalculateDiceTotal();
     }
     if (_scoreContainer.HasAllFive() == true && _scoreContainer.RowList[17].HasFilledIn() == false)
     {
         _scoreContainer.RowList[17].Possible = _scoreContainer.CalculateDiceTotal() + 50;
     }
 }