Ejemplo n.º 1
0
        public void Clear_Order()
        {
            Pennies              = 0;
            PenniesText.Text     = Pennies.ToString();
            Nickles              = 0;
            NicklesText.Text     = Nickles.ToString();
            Dimes                = 0;
            DimesText.Text       = Dimes.ToString();
            Quarters             = 0;
            QuartersText.Text    = Quarters.ToString();
            HalfDollars          = 0;
            HalfDollarsText.Text = HalfDollars.ToString();
            Dollars              = 0;
            DollarsText.Text     = Dollars.ToString();
            Ones              = 0;
            OnesText.Text     = Ones.ToString();
            Twos              = 0;
            TwosText.Text     = Twos.ToString();
            Fives             = 0;
            FivesText.Text    = Fives.ToString();
            Tens              = 0;
            TensText.Text     = Tens.ToString();
            Twenties          = 0;
            TwentiesText.Text = Twenties.ToString();
            Fifties           = 0;
            FiftiesText.Text  = Fifties.ToString();
            Hundreds          = 0;
            HundredsText.Text = Hundreds.ToString();

            TotalBox.Text = 0.00.ToString("C");
        }
Ejemplo n.º 2
0
        public void TwosShouldReturnSumOf2S(List <int> rolledDice, int expectedOutcome)
        {
            var twos   = new Twos();
            var result = twos.CalculateScore(rolledDice);

            Assert.Equal(expectedOutcome, result);
        }
Ejemplo n.º 3
0
 private void Twos_minus(object sender, RoutedEventArgs e)
 {
     if (Twos - 1 < 0)
     {
         return;
     }
     Twos--;
     TwosText.Text = Twos.ToString();
     TotalBox.Text = Total.ToString("C");
 }
 public void AddTwo(Two two)
 {
     if (two == null)
     {
         throw new ArgumentNullException("two");
     }
     if (Twos == null)
     {
         Twos = new List <Two>();
     }
     if (!Twos.Contains(two))
     {
         Twos.Add(two);
     }
     two.One = this;
 }
Ejemplo n.º 5
0
 private void Twos_add(object sender, RoutedEventArgs e)
 {
     Twos++;
     TwosText.Text = Twos.ToString();
     TotalBox.Text = Total.ToString("C");
 }