public override SearchState Search(SearchState searchState, Rating actualRating) { if (actualRating == Rating.ToHigh) { searchState.ActualMax = searchState.ActualEstimatedFigure; searchState.ActualMinIndex = searchState.LastIndex; searchState.LastIndex = (searchState.ActualMaxIndex + searchState.ActualMinIndex) / 2; searchState.ActualEstimatedFigure = -1 * CleverBinarySearchTable.Table[searchState.LastIndex]; } else { searchState.ActualMin = searchState.ActualEstimatedFigure; searchState.ActualMaxIndex = searchState.LastIndex; searchState.LastIndex = (searchState.ActualMaxIndex + searchState.ActualMinIndex) / 2; searchState.ActualEstimatedFigure = -1 * CleverBinarySearchTable.Table[searchState.LastIndex]; } searchState.AddNewAskedFigure(); return(searchState); }