public PointTotal(Match m, bool home)
            {
                int me, other;

                if (m.IsSomeoneForfeit(home))
                {
                    me = 0;
                    other = 3;
                }
                else if (m.IsSomeoneForfeit(!home))
                {
                    me = 3;
                    other = 0;
                }
                else
                {
                    me   =m.GetGoals(home);
                    other=m.GetGoals(!home);
                }
                this.goalaverage = me - other;
                if(me > other)
                    this.points=3;
                else if(me==other)
                    this.points=1;
                else
                    this.points=0;
            }
Example #2
0
 public void Register(Match m)
 {
     EntryFromClub(m.Home).Points.Increment(system.GetPointsFromMatch(m, true));
     EntryFromClub(m.Away).Points.Increment(system.GetPointsFromMatch(m, false));
     if (NewMatchRegistered != null)
         NewMatchRegistered(this, new MatchRegistrationEventArgs() { NewMatch = m });
     Array.Sort(entries);
 }
 public TotalMock(Match m, bool home)
 {
     this.points = m.GetGoals(home) - m.GetGoals(!home);
 }
 public override ITotal GetPointsFromMatch(Match m, bool isHome)
 {
     return new TotalMock(m, isHome);
 }
Example #5
0
 public void Register(Match m)
 {
     EntryFromClub(m.Home).Points.Increment(system.GetPointsFromMatch(m, true));
     EntryFromClub(m.Away).Points.Increment(system.GetPointsFromMatch(m, false));
     Array.Sort(entries);
 }
Example #6
0
 public abstract ITotal GetPointsFromMatch(Match m, bool isHome);
 public override PointSystem.ITotal GetPointsFromMatch(Match m, bool isHome)
 {
     return new PointTotal(m, isHome);
 }