public AbstractDebater(AbstractDebater d) { // make a nice copy, but be lazy and use Parse methods... name = new Name(d.Name.ToString()); age = d.Age; club = new Club(d.Club.ToString()); role = new Role(d.Role.ToString()); }
public AbstractDebater(AbstractDebater d) { // TODO create proper copying methods for Name, Club, Role, etc. name = new Name(d.Name.FirstName, d.Name.LastName); age = d.Age; club = new Club(d.Club.Name, d.Club.City); role = d.Role.IsJudge ? new Role(d.Role.JudgeQuality) : new Role(d.Role.TeamName); }
public bool ConflictsWith(AbstractDebater d) { if (whiteList.Matches(d)) { return(false); } if (blackList.Matches(d)) { return(true); } return(false); }
public override bool Equals(object obj) { if (obj is Club) { Club c = (Club)obj; return(c.Name.Equals(Name)); } else if (obj is AbstractDebater) { AbstractDebater d = (AbstractDebater)obj; return(d.Club.Equals(this)); } else { throw new NotImplementedException(); } }
public override bool Equals(object obj) { if (obj is AbstractDebater) { AbstractDebater d = (AbstractDebater)obj; return(d.Name.Equals(Name) && d.Club.Equals(Club)); } else if (obj == null) { return(false); } else { throw new NotImplementedException("Don't know how to equal " + obj); } }
public override bool Equals(object obj) { if (obj is Name) { Name n = (Name)obj; return(n.FirstName.Equals(FirstName) && n.LastName.Equals(LastName)); } else if (obj is AbstractDebater) { AbstractDebater d = (AbstractDebater)obj; return(d.Name.Equals(this)); } else { throw new NotImplementedException(); } }
public bool Matches(AbstractDebater debater) { foreach (string c in clubNames) { if (debater.Club.Name.Equals(c)) { return(true); } } foreach (Name n in debaters) { if (n.Equals(debater)) { return(true); } } return(false); }
public int CompareTo(object obj) { if (obj is AbstractDebater) { AbstractDebater d = (AbstractDebater)obj; int res = Name.CompareTo(d.Name); if (res == 0) { return(Club.CompareTo(d.Club)); } else { return(res); } } else { return(0); } }
public RoundDebater(AbstractDebater d, bool shown, JudgeStateType state) : base(d) { isShown = shown; judgeState = state; }
public RoundDebater(AbstractDebater d, bool shown) : this(d, shown, JudgeStateType.Judge) { }
public RoundDebater(AbstractDebater d) : this(d, true, JudgeStateType.Judge) { }