internal bool Remove(Duel duel) { var comparer = new Duel.EqualityComparer(); var index = this.Duels.FindIndex(d => comparer.Equals(d, duel)); if (index < 0) return false; this.Duels.RemoveAt(index); return true; }
private void AssertDecisionIsNotRegisteredYet(Duel duel) { var comparer = new Duel.EqualityComparer();; if (this.Outcomes.Any(o => comparer.Equals(o.Decision.Duel, duel))) { throw new Exception("A decision for this duel has already been registered."); } }