/// <summary>
        /// When writing games and using the Odometer as a score control, you
        /// may wish to increment the score by a thousand rather than 1.This
        /// method allows you to pass in an IncrementDigit specifying which
        /// digit to rollover.
        /// </summary>
        /// <param name="digit">the digit to move</param>
        public void Increment(IncrementDecrementDigit digit)
        {
            int theDigit = (int)digit;

            if (this.digits.Count > theDigit - 1)
            {
                this.digits[this.digits.Count - theDigit].Increment();
            }
        }
示例#2
0
 /// <summary>
 /// When writing games and using the Odometer as a score control, you
 /// may wish to increment the score by a thousand rather than 1.This
 /// method allows you to pass in an IncrementDigit specifying which
 /// digit to rollover.
 /// </summary>
 /// <param name="digit">the digit to move</param>
 public void Increment(IncrementDecrementDigit digit)
 {
     int theDigit = (int)digit;
     if (this.digits.Count > theDigit - 1)
     {
         this.digits[this.digits.Count - theDigit].Increment();
     }
 }