private Opponent( BlockNumber blockNumber, GameNumber gameNumber, DrawNumber drawNumber, SeedLevel seedLevel, AssignOrder assignOrder, PlayerClassification playerClassification, EntryNumber entryNumber, SeedNumber seedNumber, TeamCodes teamCodes, TeamAbbreviatedNames teamAbbreviatedNames, PlayerCodes playerCodes, PlayerNames playerNames, GameNumber fromGameNumber) { this.BlockNumber = blockNumber; this.GameNumber = gameNumber; this.DrawNumber = drawNumber; this.SeedLevel = seedLevel; this.AssignOrder = assignOrder; this.FramePlayerClassification = PlayerClassification.General; this.IsManuallySettingFrame = false; this.IsManuallyAssigned = false; this.PlayerClassification = playerClassification; this.EntryNumber = entryNumber; this.SeedNumber = seedNumber; this.TeamCodes = teamCodes; this.TeamAbbreviatedNames = teamAbbreviatedNames; this.PlayerCodes = playerCodes; this.PlayerNames = playerNames; this.FromGameNumber = fromGameNumber; }
/// <summary> /// 対戦者を更新します。 /// </summary> /// <param name="playerClassification">選手区分。</param> /// <param name="entryNumber">エントリー番号。</param> /// <param name="seedNumber">シード番号。</param> /// <param name="teamCodes">団体登録番号一覧。</param> /// <param name="teamAbbreviatedNames">団体名略称一覧。</param> /// <param name="playerCodes">登録番号一覧。</param> /// <param name="playerNames">氏名一覧。</param> /// <param name="fromGameNumber">一つ前の試合番号。</param> /// <param name="drawNumber">割当先のドロー番号。</param> public void UpdateOpponent( PlayerClassification playerClassification, EntryNumber entryNumber, SeedNumber seedNumber, TeamCodes teamCodes, TeamAbbreviatedNames teamAbbreviatedNames, PlayerCodes playerCodes, PlayerNames playerNames, GameNumber fromGameNumber = null, DrawNumber drawNumber = null) { if (drawNumber == null) { this.Opponents .First(o => !o.IsAssigned) .UpdateOpponent( playerClassification, entryNumber, seedNumber, teamCodes, teamAbbreviatedNames, playerCodes, playerNames, fromGameNumber ); } else { this.Opponents .First(o => o.DrawNumber == drawNumber) .UpdateOpponent( playerClassification, entryNumber, seedNumber, teamCodes, teamAbbreviatedNames, playerCodes, playerNames, fromGameNumber ); } if (this.Opponents.Count(o => o.IsAssigned) == maxOpponentsCount) { this.GameResult.Ready(); } }
/// <summary> /// 対戦者の新しいインスタンスを生成します。 /// </summary> /// <param name="drawNumber">ドロー番号。</param> /// <param name="seedLevel">シードレベル。</param> /// <param name="assignOrder">割当順。</param> public Opponent( DrawNumber drawNumber, SeedLevel seedLevel, AssignOrder assignOrder) { this.DrawNumber = drawNumber; this.SeedLevel = seedLevel; this.AssignOrder = assignOrder; this.FramePlayerClassification = PlayerClassification.General; this.IsManuallySettingFrame = false; this.IsManuallyAssigned = false; this.PlayerClassification = null; this.EntryNumber = null; this.SeedNumber = null; this.TeamCodes = null; this.TeamAbbreviatedNames = null; this.PlayerCodes = null; this.PlayerNames = null; }