I'm trying to get my twist method to do the following:
store a number (result)
generate a random number and add it to result
The code I have so far is:
public int twist(int min, int max)
{
int result = 0;
Random random = new Random();
int y = random.Next(min, max);
result += y;
System.Diagnostics.Debug.WriteLine(result);
return result;
}
All it does is generate a new number each time because I'm not storing it, I don't think I need a loop, but I need to store result after each increment of y, and y should only be incremented each time the twist method is called.