ok, that is a little different than since in #1 you asked to avoid 2 numbers...
B4X:
Dim intNewNumber As Int = Rnd(1, 10), intOldNumber as Int = intNewNumber
'
Do Until intNewNumber <> intOldNumber
intNewNumber = Rnd(1, 10)
Loop
intOldNumber = intNewNumber
Put all the levels in a list in a random order. Then, take a random one from the first 8 (assuming 10 levels and 2 barred). Then, simply put the used one at the end of the list. The next time, just re-use the list.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.