title: Basic C# Dice Game
body: <p>I am new to c# and coding in general. To try and improve my skills I am trying to create a basic game where two players roll a dice and keep record of their score. The player wins by reaching 20. Each player takes turns rolling a dice adding their first roll to their second and so on until one of them reaches 20. A player can roll the dice again if they roll a six.</p>
  
  <p>The current code I have is:</p>
  
  <hr>
  
  <pre><code>        do
          {
  
              Console.Write("Enter the name of Player 1: ");
              Player[0] = Console.ReadLine();
              Console.Write("Enter the name of Player 2: ");
              Player[1] = Console.ReadLine();
  
              Random DiceRandom = new Random();
              DiceThrow[0] = DiceRandom.Next(1, 7);
  
              int i = 0;
              while (i &lt;= 1)
              {
                  DiceThrow[0 + i] = DiceRandom.Next(1, 7);
                  Console.ReadLine();
                  Console.Write(Player[0 + i] + " rolled a " + DiceThrow[0 + i]);
                  if (DiceThrow[0 + i] != 6) i++;
              }
  
              Console.ReadLine();
              PlayerTotal[0] = DiceThrow[0];
              PlayerTotal[1] = DiceThrow[1];
  
  
              Console.ReadLine();
              Console.Write(Player[0] + " currently has " + PlayerTotal[0]);
              Console.ReadLine();
              Console.Write(Player[1] + " currently has " + PlayerTotal[1]);
              Console.ReadLine();
  
          }
          while (PlayerTotal[0] == 20);
          while (PlayerTotal[1] == 20);
  </code></pre>
  
  <hr>
  
  <p>What I am specifically struggling with is adding the players first roll to there second roll. And if a player rolls a six that it adds the 6 to what they get in the re-roll.</p>
  
  <p>Any help at all will be greatly appreciated.</p>