well, 3 fixes,
1. Change RandomRange(X, Y), so it can get all values between X and Y, Inclusive.
2. Create a simmilar function which gets all values between X and Y, inclusive, e.g.
Function RandomNumber(Num1, Num2: Integer): Integer;
begin
Result := RandomRange(Min(Num1, Num2), Max(Num1, Num2) + 1);
end;
and then change all the places it is used to be the new function.
3. Change all the places so it has RandomRange(X, Y + 1) instead of just RandomRange(X, Y)…
I personally prefer the second option, and the first can stuff up way to many things…