public void wins_on_odd_if_odd_was_true() { OddEvenWinningStrategy strategy = new OddEvenWinningStrategy(true); for (int i = 1; i < 36; i += 2) { Assert.IsTrue(strategy.WinsOn(i)); Assert.IsFalse(strategy.WinsOn(i + 1)); } }
public bool Equals(OddEvenWinningStrategy obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; return obj.isOdd == this.isOdd; }