private void DigitsAssert(ISecretNumber <int> actual, Action <ISecretDigit <int>, ISecretDigit <int> > condition) { for (int index = 0; index < _expectedDigits.Count(); index++) { ISecretDigit <int> expectedDigit = _expectedDigits.ElementAt(index); ISecretDigit <int> actualDigit = actual.Digits.ElementAt(index); condition(actualDigit, expectedDigit); } }
private bool IsBull(ISupposedDigit <TValue> parameter) { ISecretDigit <TValue> secretDigit = GetSecretDigit(parameter.Index); return(secretDigit.Value.Equals(parameter.Value)); }