title: How do I limit what classes can change the value of a field in another non related class
body: <p>As a part of a video game, I need to store player profiles.  </p>
  
  <p>If I have a <code>Player</code> class like this:</p>
  
  <pre><code>public class Player
  {
      public string username { get; private set; }
      public int numberOfWins { get; private set; }
  
      public void AddWin()
      {
          numberOfWins++;
      }
  }
  </code></pre>
  
  <p>and a <code>Game</code> class like this:</p>
  
  <pre><code>public class Game
  {
      Player playerOne;
      Player playerTwo;
  
      int playerOneScore;
      int playerTwoScore;
  
      public void HandleGameEnd()
      {
          if (playerOneScore &gt; playerTwoScore)
          {
              playerOne.AddWin();
          }
  
          else
          {
              playerTwo.AddWin();
          }
      }
  }
  </code></pre>
  
  <p>How will I have to change my code to make sure that the only thing that use <code>AddWin()</code> is <code>HandleGameEnd()</code>?</p>