private void AddMatch(string player1, string player2) { IMatch m = new MyMatch(player1, player2); matchs.Add(m); OnNewMatchAdded((MyMatch)m); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (this == obj) { return(true); } if (GetType() != obj.GetType()) { return(false); } MyMatch other = (MyMatch)obj; if (!other.Joueurs[0].Equals(Joueurs[0]) || !other.Joueurs[1].Equals(Joueurs[1])) { return(false); } return(other.Fini.Equals(Fini)); }
public void OnNewMatchAdded(MyMatch m) { NewMatchCreated?.Invoke(this, m); }