Exemplo n.º 1
0
 // その組み合わせの出場回数の合計を返す(設問1用)
 public int GetWeightForAnswer1(MultiMatch m)
 {
     return
         (this.GetWeightMatch(m) +
          this.GetWeightPair(m) +
          this.GetWeightPlayer(m));
 }
Exemplo n.º 2
0
 // ペアの出場回数カウントアップ
 private void CountUpPair(MultiMatch m)
 {
     this.Pair[m.Match1.Pair1.Label]++;
     this.Pair[m.Match1.Pair2.Label]++;
     this.Pair[m.Match2.Pair1.Label]++;
     this.Pair[m.Match2.Pair2.Label]++;
 }
Exemplo n.º 3
0
 // 指定組み合わせの出場回数をカウントアップ
 public void CountUp(MultiMatch m)
 {
     this.CountUpMatch(m);
     this.CountUpSameCourtThree(m);
     this.CountUpSameCourtTwo(m);
     this.CountUpPair(m);
     this.CountUpPlayer(m);
 }
Exemplo n.º 4
0
 // ペアの出場回数合計
 private int GetWeightPair(MultiMatch c)
 {
     return
         (this.Pair[c.Match1.Pair1.Label] +
          this.Pair[c.Match1.Pair2.Label] +
          this.Pair[c.Match2.Pair1.Label] +
          this.Pair[c.Match2.Pair2.Label]);
 }
Exemplo n.º 5
0
 // その組み合わせの出場回数の合計を返す
 public int GetWeight(MultiMatch m)
 {
     return
         (this.GetWeightMatch(m) +
          //this.GetWeightSameCourtThree(m) +
          this.GetWeightSameCourtTwo(m) +
          this.GetWeightPair(m) +
          this.GetWeightPlayer(m));
 }
Exemplo n.º 6
0
        //public IEnumerable<Pair> GetPair()
        //{
        //    var hoge = this.Pair.OrderBy(x => x.Value).Select(x => x.Key);
        //    foreach(var h in hoge)
        //    {

        //    }
        //}

        // 過去に顔を合わせた3人がコート上に存在しているか
        public bool isExistTwoMore(MultiMatch m)
        {
            if (m.Match1.TriosSameCourt.Any(x => this.SameCourtThree[x.Label] > 0))
            {
                return(true);
            }
            if (m.Match2.TriosSameCourt.Any(x => this.SameCourtThree[x.Label] > 0))
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 7
0
 // プレイヤーの出場回数合計
 private int GetWeightPlayer(MultiMatch m)
 {
     return
         (this.Player[m.Match1.Pair1.Player1.Label] +
          this.Player[m.Match1.Pair1.Player2.Label] +
          this.Player[m.Match1.Pair2.Player1.Label] +
          this.Player[m.Match1.Pair2.Player2.Label] +
          this.Player[m.Match2.Pair1.Player1.Label] +
          this.Player[m.Match2.Pair1.Player2.Label] +
          this.Player[m.Match2.Pair2.Player1.Label] +
          this.Player[m.Match2.Pair2.Player2.Label]);
 }
Exemplo n.º 8
0
 // 同コートの2人出場回数カウントアップ
 private void CountUpSameCourtTwo(MultiMatch m)
 {
     m.Match1.PairsSameCourt.ToList().ForEach(x => this.SameCourtTwo[x.Label]++);
     m.Match2.PairsSameCourt.ToList().ForEach(x => this.SameCourtTwo[x.Label]++);
 }
Exemplo n.º 9
0
 // 同コードの3人出場回数カウントアップ
 private void CountUpSameCourtThree(MultiMatch m)
 {
     m.Match1.TriosSameCourt.ToList().ForEach(x => this.SameCourtThree[x.Label]++);
     m.Match2.TriosSameCourt.ToList().ForEach(x => this.SameCourtThree[x.Label]++);
 }
Exemplo n.º 10
0
 // 試合の出場回数カウントアップ
 private void CountUpMatch(MultiMatch m)
 {
     this.Match[m.Match1.Label]++;
     this.Match[m.Match2.Label]++;
 }
Exemplo n.º 11
0
 // 同コート内での2人組み合わせの出場回数合計
 private int GetWeightSameCourtTwo(MultiMatch c)
 {
     return
         (c.Match1.PairsSameCourt.Sum(x => this.SameCourtTwo[x.Label]) +
          c.Match2.PairsSameCourt.Sum(x => this.SameCourtTwo[x.Label]));
 }
Exemplo n.º 12
0
 // 同コート内での3人組み合わせの出場回数合計
 private int GetWeightSameCourtThree(MultiMatch c)
 {
     return
         (c.Match1.TriosSameCourt.Sum(x => this.SameCourtThree[x.Label]) +
          c.Match2.TriosSameCourt.Sum(x => this.SameCourtThree[x.Label]));
 }
Exemplo n.º 13
0
 // 指定試合の出場回数合計
 private int GetWeightMatch(MultiMatch m)
 {
     return
         (this.Match[m.Match1.Label] +
          this.Match[m.Match2.Label]);
 }