public SituationMatrix Add(SituationMatrix other) { return (new SituationMatrix { WasBetrayedCount = WasBetrayedCount + other.WasBetrayedCount, BetrayedCount = BetrayedCount + other.BetrayedCount, BothBetrayedCount = BothBetrayedCount + other.BothBetrayedCount, NoneBetrayedCount = NoneBetrayedCount + other.NoneBetrayedCount }); }
private void GetSituationKind(bool firstBetrayed, bool secondBetrayed, out SituationMatrix s1, out SituationMatrix s2) { if (firstBetrayed && secondBetrayed) { s1 = new SituationMatrix { BothBetrayedCount = 1 }; s2 = new SituationMatrix { BothBetrayedCount = 1 }; } else if (!firstBetrayed && !secondBetrayed) { s1 = new SituationMatrix { NoneBetrayedCount = 1 }; s2 = new SituationMatrix { NoneBetrayedCount = 1 }; } else if (firstBetrayed) { s1 = new SituationMatrix { BetrayedCount = 1 }; s2 = new SituationMatrix { WasBetrayedCount = 1 }; } else { s1 = new SituationMatrix { WasBetrayedCount = 1 }; s2 = new SituationMatrix { BetrayedCount = 1 }; } }