var PlayerList = React.createClass({
  propTypes: {
    players: React.PropTypes.array,
    game_id: React.PropTypes.number
  },

  render: function() {
    var playerList = this;
    var playerNodes = this.props.players.map(function (player) {
      return (
        <Player
          key={player.id}
          onPlayHandSubmit={playerList.props.onPlayHandSubmit}
          controlling_player_id={playerList.props.controlling_player_id}
          current_user_id={playerList.props.current_user_id}
          user_id={player.user_id}
          game_id={playerList.props.game_id} {...player} />
      );
    });

    return (
      <div>
        PlayerList:
        {playerNodes}
      </div>
    );
  }

});
