コード例 #1
0
ファイル: Opponent.cs プロジェクト: shimizu-tnet/EB
 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;
 }
コード例 #2
0
ファイル: Opponent.cs プロジェクト: shimizu-tnet/EB
        /// <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="isManuallyAssigned">手動で割り当てフラグ。</param>
        public void UpdateOpponent(
            PlayerClassification playerClassification,
            EntryNumber entryNumber,
            SeedNumber seedNumber,
            TeamCodes teamCodes,
            TeamAbbreviatedNames teamAbbreviatedNames,
            PlayerCodes playerCodes,
            PlayerNames playerNames,
            GameNumber fromGameNumber = null,
            bool 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;
            this.IsManuallyAssigned   = isManuallyAssigned;

            if (this.Game != null && this.Game.Opponents.Count(o => o.IsAssigned) == Game.maxOpponentsCount)
            {
                this.Game.GameResult.Ready();
            }
        }
コード例 #3
0
        /// <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();
            }
        }