title: Roll the dice Game
body: <p>Its roll the dice application. I want to sum up the dice results and present them to the user. Currently the dice image will change after I click the button "Click to roll the die".</p>
  
  <p>However, When I rolled the dice 1, result will not be add (+0) and when i rolled dice 2, the result will only (+1). I have no idea what's wrong with my code:</p>
  
  <pre><code>public partial class PigForm : Form
  {
      Image[] diceImages;
      int[] dice;
      Random roll;
  
      private void rollDieBotton_Click(object sender, EventArgs e)
      {
          RollDice();
      }
  
      private void RollDice()
      {
          for (int i = 0; i &lt; dice.Length; i++)
          {
              var currentRoll = roll.Next(0, 6);
              dice[i] += currentRoll;
              dicePictureBox.Image = diceImages[currentRoll];
              playersTotal.Text = String.Format("{0}", dice[i]);
          }
      }
  
      private void PigForm_Load(object sender, EventArgs e)
      {
          diceImages = new Image[6];
          diceImages[0] = Properties.Resources.Alea_1;
          diceImages[1] = Properties.Resources.Alea_2;
          diceImages[2] = Properties.Resources.Alea_3;
          diceImages[3] = Properties.Resources.Alea_4;
          diceImages[4] = Properties.Resources.Alea_5;
          diceImages[5] = Properties.Resources.Alea_6;
  
          dice = new int[1] { 0 };
          roll = new Random();
      }
  }
  </code></pre>