But if this truly is a roulette simulation, then you need to *ALSO* determine what the PAYOFF is for win. That is, if the ball really is found in one of your arrays, what does the player get paid?
So I think you need to account for *ALL* of that.
I think (not sure) that this is pretty easy: I think that in roulette the payoff is always based on the number of choices available on the "bet" the user made.
That is, the payoff for the ball being in [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34] is 3 for 1 because there are 12 elements to that array and 36/12 is 3.
Similarly, for a match on [0, 1] the payoff is 18 for 1, because there are 2 elements in that array and 36/2 is 18.
As for generating ALL the possible splits: First of all, you only need the splits that one or more players have actually bet on. So I'd be tempted to use JS code to *generate* only those bet-on splits. For other bets (red, black, column, 6-group, etc.) I'd probably create the groups ahead of time.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.