Pokies for random number generation without repetition

whitesanchez karlshady1990 at gmail.com
Mon Feb 20 11:50:18 UTC 2023


**I've seen many tutorials, but it seems none works for online 
pokies.**
I need to generate random numbers without repeating. I need to 
take games that [here by this 
link](https://pokieslab.com/free-online-pokies/lightning-link/), 
I want to create mobile version of this slot site

My issue is challenging to resolve, especially in vb. Instead of 
a random roll, I'm searching for a random deal. Instead of a 
dealer spinning a 25-slot roulette wheel, try to find an 
imitation of a dealer taking cards out of a shuffled deck of 25 
cards one at a time.

I have a three-row, five-roll slot machine that is rather simple.

I've been attempting to solve a problem for a while, but I'm 
having trouble. The problem is the roll animation. I'm going to 
assume that:

At least ten symbols are on a roll. However, there are only three 
that are visible on the screen (the rest is above the screen - 
invisible)

Although I've seen many lessons, none seem to apply to me. I 
require random integers that don't repeat.

Here's my code:
```d
Dim intNumber As Integer
     Dim arrNumber(0 To 0) As Integer
     Dim i, x, y As Integer
     'Make sure the Label is clear
     Label1.Text = ""



     For x = 0 To 0
Start:
         intNumber = Int((25 * Rnd()) + 1) ' Random number 1 to 25
         For y = 0 To 0
             ' Check arrNumber (y)
             'If intnumber has already been selected,
             'Then go and select another one.
             If intNumber = arrNumber(y) Then
                 GoTo Start
             End If
         Next y

         'Place the next non-repeated number in the arrNumber(x).

         arrNumber(x) = intNumber


     Next x

     '----------------------------------------------------
     For i = 0 To 0

         Label1.Text = Label1.Text & (arrNumber(i))
         broj1.random.Text = Label1.Text
     Next

```


More information about the Digitalmars-d mailing list