/// <summary> /// Constructor for SCORE-based brackets. /// Default sets Rank = 1 and scores = 0. /// </summary> /// <param name="_id">Player ID</param> /// <param name="_name">Player name</param> public PlayerScore(int _id, string _name) { this.Id = _id; this.Name = _name; Rank = 1; MatchRecord = new PlayerRecord(); OpponentsScore = GameScore = PointsScore = 0; }
/// <summary> /// Constructor for ELIMINATION-type brackets. /// Sets scores = -1 (they're not necessary). /// </summary> /// <param name="_id">Player ID</param> /// <param name="_name">Player name</param> /// <param name="_rank">Player's rank</param> public PlayerScore(int _id, string _name, int _rank) { this.Id = _id; this.Name = _name; this.Rank = _rank; // MatchRecord isn't used, but a NULL value breaks the WebApp, // so initialize it here: MatchRecord = new PlayerRecord(); OpponentsScore = GameScore = PointsScore = -1; }