Search:

Type: Posts; User: Tjstretch

Search: Search took 0.16 seconds.

  1. Replies
    3
    Views
    1,264

    Re: problem with Random()

    It appears you want a set of psuedorandom numbers, in which it would be better to have that line something closer to

    t = r.nextInt(6);

    Which would be a random number between 0 and 5.
  2. Replies
    3
    Views
    1,264

    Re: problem with Random()

    Are you trying to make it so that the number is likely to get bigger the further you go?

    All you have to do is make t = r.nextInt(i+1), so when i=0 it does r.nextInt(1) [Always 0!]

    Are you...
Results 1 to 2 of 2