title: Keeping track of score in a list along with names
body: <p>Hi again dear StackOverflow! I'm new to learning C# and I'm stuck on a "add score" program.</p>
  
  <p>The basic idea of what I'm trying to do is:</p>
  
  <ul>
  <li>Enter a number of players</li>
  <li>Name the above number of players</li>
  <li>Let all players add 3 scores for 3 rounds</li>
  <li>Display the score each player had each round.</li>
  </ul>
  
  <p>For example:</p>
  
  <pre><code>players = 1
  name = bilbo
  
  round1 begins:
  score1 = 10
  score2 = 10
  score3 = 10
  
  round2 begins:
  score1 = 20
  score2 = 20
  score3 = 20
  
  round2 begins:
  score1 = 30
  score2 = 30
  score3 = 30
  
  game ends:
  Congratulations bilbo your score was as follows:
  round1:
  10,10,10
  round2:
  20,20,20
  round3:
  30,30,30
  Total score: 180
  </code></pre>
  
  <p>My problem is I do not know how to keep track of each round. The way it works for me now it that it overwrites the score so the only score displayed is the last one. In this case the output would look like</p>
  
  <pre><code>total score: 90 // aka the last 3 scores
  </code></pre>
  
  <p>How can I keep track on each round and connect that score to the correct player?</p>
  
  <p>I know that there is very little to none validation, but that is not the issue at hand for me :)</p>
  
  <p>Great weekend to all and thanks in before hand for any help given.</p>
  
  <p>Code so far:</p>
  
  <pre><code>class Program
  {
    static void Main(string[] args)
    {
      List&lt;Player&gt; players = new List&lt;Player&gt;();
      Console.WriteLine("How many players?");
      int howManyPlayers = Convert.ToInt32(Console.ReadLine());
  
      for (int i = 0; i &lt; howManyPlayers; i++)
      {
        Console.WriteLine("Name the player");
        Player playa = new Player() { Name = Console.ReadLine()};
        players.Add(playa);
      }
  
      for (int i = 0; i &lt; 3; i++)
      {
        foreach (var item in players)
        {
          Console.WriteLine("Enter points1 for round {}", i);
          int round1Input = Convert.ToInt32(Console.ReadLine());
          Console.WriteLine("Enter points2 for round {}", i);
          int runda2Input = Convert.ToInt32(Console.ReadLine());
          Console.WriteLine("Enter points3 for round {}", i);
          int runda3Input = Convert.ToInt32(Console.ReadLine());
          item.totalScore(item.arrow1 = round1Input, 
          item.arrow2 = runda2Input,   item.arrow3 = runda3Input);
        }
      }
  
      printAllPlayers(players);
    }
  
    static void printAllPlayers(List&lt;Player&gt; players)
    {
      Console.WriteLine("Printing {0} players ...", players.Count);
      foreach (Player player in players)
      {
        Console.WriteLine("Player: {0} \nScore: {1}", player.Name, player.Score);
      }
    }
  }
  
  class Player
  {
    public string Name { get; set; }
    public int Score { get; set; }
    public int arrow1 { get; set; }
    public int arrow2 { get; set; }
    public int arrow3 { get; set; }
  
    public void totalScore(int arrow1, int arrow2, int arrow3)
    {
      Score = arrow1 + arrow2 + arrow3;
    }
  }
  </code></pre>