Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Replies
    3
    Views
    1,215

    Re: need help with code

    Here's a simple example:
    Say there is a max of 20 values being generated: 0-19


    boolean[] savePastNbrs = new boolean[20]; // define an array to detect if a number has been used (init to false)...
  2. Replies
    3
    Views
    1,215

    Re: need help with code

    Then you need to save the previous numbers. When you get the next random number, check if you've saved it, if not save and return it, else get another number.

    How and where you save the the...
Results 1 to 2 of 2