Was wondering how all these roulette sites, as well as how all of this is protected from substitution.
A trivial example is the generated array of values.
For example, we have unique values:
items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
From them we form a unique array of values for the game:
items_for_game = [3, 4, 4, 7, 1, 9, 10, 1, 4, 7, 6, 2, 9, 8, 2, 2, 10, 3, 6, 4 6, 4, 8, 9, 10, 4, 3, 6, 2, 4]
On the website of them formed by the horizontal tape. Moreover, cyclical. This tape consists of a hidden user group:
<input type="radio" name="items" value="here's a number from the array above">
On clicking the button the tape starts to turn.
From the starting speed every second subtracted some value, and stopping the tape.
And at this stage is brewing three major issues:
1. How to implement the scrolling strip? After all, a simple slide here obviously do not? Or is this a banal slide?
2. For example, the first item sorted out. How to identify an element? I mean how to identify the selected item? For example, the selected is the one element that was at the center of the block after stopping the tape.
3. How to get rid of fraud? I understand that everything is in HTML code can easily edited by the user. Including the ID of the radio input. Hence there is no desire to use the input radio - this is no longer necessary. In short, the third item is closely linked with the second. How to implement it?
I can assume that instead of an array items_for_game we create an object items_for_game, with keys from 0 to N. Then get a random number element, which drives the stop band (it is not: "From the starting speed every second subtracted some value, and stopping the tape.").
In General, the experts, what do you say? :)
That is on the server side is formed and the tape itself, in the right place is inserted the right number?
Every second is calculated and then reduced speed, that would be a rate of zero was the place where pre-selected ID? - alfonzo.Zeml commented on July 9th 19 at 10:37
I sites visit is already formed tape before it runs.
The question about stopping the tape at pre-selected element while I is not clear. - alfonzo.Zeml commented on July 9th 19 at 10:40