View Single Post
Old 12-05-2012, 12:20 PM   PM User | #4
triko
New Coder

 
Join Date: Oct 2012
Location: Italy
Posts: 72
Thanks: 3
Thanked 0 Times in 0 Posts
triko is an unknown quantity at this point
OK! as usual I haven't explained...
I have the problem of the game roulette...
When click start, put out one number random from 0 to 36
Code:
var ball = Math.floor(Math.random()*36);
before I have all my bets, example corners, split, red or black ecc... My problem born for corner, split, column, dozen ecc... Because I have all array of the possible combination, example columns:
Code:
       var col1 = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34];
       var col2 = [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35];
       var col3 = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36];
Ok now in my css part I selected col1 and start the game... ball = 16;
Now I don't know how tell that the number 16 is into col1!
Other example is for split, there are so many, from split1 to split60:
Code:
       var split1 = [0, 1];
       var split2 = [0, 2];
       var split3 = [0, 3];
       var split4 = [1, 2];
       var split5 = [2, 3];
       var split6 = [1, 4];
       var split7 = [2, 5];
       var split8 ........... ecc
Here have more combination possible and I don't know how to say if the ball = 0, if split 1 or 2 or 3!
triko is offline   Reply With Quote