a generator that yields random selected non-repeating elements out of a 1D array. once the all elements have been yielded, a cycle has been completed. after a cycle is completed the iterator resets to a new cycle, yielding randomly selected elements once again. the ordering of the randomly yielded elements will also differ from compared to the first time.
moreover, you can call the iterator with an optional number argument that specifies if you wish to skip ahead a certain number of elements.

  • 1: go to next element (default behavior)
  • 0: receive the same element as before
  • -1: go to previous next element
  • +ve number: skip to next number of elements
  • -ve number: go back number of elements

note that once a cycle is complete, going back won't restore the correct element from the previous cycle, because the info about the previous cycle gets lost.