Beispiel #1
0
        public static string GetTakeScoreString1(ResultsItem item)
        {
            string _string = "";

            if (item.Value > 0)
            {
                // eg:  Aces for XX points
                _string = $"{ rowHeader1Labels [ ( int ) item.Row ]} { scoringStrings [ 2 ]} { item.Value.ToString ()} { scoringStrings [ 3 ]}";
            }
            else
            {
                // eg:  Scratch Aces
                _string = $"{ scoringStrings [ 0 ]} {  rowHeader1Labels [ ( int ) item.Row ]}.";
            }

            return(_string);
        }
Beispiel #2
0
        public static string GetDescriptionString()
        {
            //   CommitDescriptionStrings = new string [] { "Rolling for", "Take", "for", "points.", "Press the New Game button or Quit" };
            int _roll = GameModel1.CurrentDiceRoll;
            //int _rollsLeft = 3 - _roll;
            Row    _row     = GameModel1.RowSelected;
            string _text    = "  ";
            string _rowText = " ";

            // If Game is over =>     Press the New Game button or Quit
            if (GameModel1.GameRound >= 17)
            {
                _text = CommitDescriptionStrings [5];
            }
            else
            {
                if (_row == Row.Unselected)
                {
                    // "No scoring option selected"
                    _text = $"{CommitDescriptionStrings [ 4 ]}";
                }
                else
                {
                    //int _intRow = ( int ) _row;
                    //if ( _intRow >= 6 )
                    //    _intRow = _intRow - 2;
                    //ResultsItem _resultsItem = GameScoring1.ScoringList [ _intRow ];
                    ResultsItem _resultsItem = GameScoring1.GetResultsItem(_row);
                    string      _points      = _resultsItem.Value.ToString();
                    _rowText = rowHeader1Labels [(int)_row];
                    if (_roll < 3)
                    {
                        _text = $"{CommitDescriptionStrings [ 0 ]} {_rowText}.";
                    }
                    else
                    {
                        _text = $"{CommitDescriptionStrings [ 1 ]} {_rowText} {CommitDescriptionStrings [ 2 ]} {_points} {CommitDescriptionStrings [ 3 ]}";
                    }
                }
            }
            return(_text);
        }