title: How to get the constructor's parent inside the constructor function (JS)
body: <p>I have a bit complicated JS Objects structure:</p>
  
  <pre><code>var Players = {};
  
  Players.Player = function (color) {
    this.color = color; //the color can be either black or white
    Players[color] = this;
  }
  Players.Player.prototpe.Piece = function () {
    return this.parent.color //of course, this is not valid
  }
  new Players.Player("black");
  new Players.Player("white");
  new Players["black"].Piece(); //here I want to get "black"
  new Players["white"].Piece(); //here I want to get "white"
  </code></pre>
  
  <p>I hope I described my problem well enough. I want to be able to return the color of the paret of the constructor, meaning to replace <code>this.parent.color</code> with a better command that will return "black" on the first piece and "white" on the second piece.</p>
  
  <p>Thank you!</p>