# Odds of winning : 95.41%

## ​Fruit's Adventures use 8 stake buttons to offer 22 units to win. Odds of winning : 95.41%

#### Stake: 8 buttons 8 stake buttons

#### 22 units: x2 for 7, x4 for 4, x6 for 3, x8 for 3, x12 for 2, x32 for 1 and luck for 2 units 22 game units

#### Luck: Get extra results automatically Luck: Get extra results automatically

#### Multiple Number: Random 1 to 9 to multiple rewards Multiple Number: Random 1 to 9 to multiple rewards

### Script to verify odds of winning as 95.41%

layout = [5, 4, 2, 8, 7, 1, 4, 7, 5, 2, 6, 5, 4, 3, 8, 2, 1, 0, 7, 6, 3, 1];
rate = [4, 2, 2, 0, 4, 8, 6, 4, 2, 2,12, 4, 6, 2, 0, 4, 4,32, 2,12, 8, 2];
sum=0;for(i=0;i<rate.length;i++)sum+=rate[i];
avg = sum / 20;
rate7 = [2,3,4,5,9];
// make sam_bet_rate
rate = [4, 2, 2, 5, 4, 8, 6, 4, 2, 2,12, 4, 6, 2, 5, 4, 4,32, 2,12, 8, 2];
sam_bet_rate = [];
for(var b=0;b<9;b++){
var s = 0;
for(var l=0;l<layout.length;l++){
if(layout[l]==b){
s += rate[l];
}
}
for(var l=0;l<layout.length;l++){
if(layout[l]==b){
sam_bet_rate[l] = s;
}
}
}
// sam_bet_rate = [10, 14, 8, 10, 10, 14, 14, 10, 10, 8, 24, 10, 14, 10, 10, 8, 14, 32, 10, 24, 10, 14]
ratej = [];
mini = 0;
for(var i=0;i<sam_bet_rate.length;i++){
ratej[i] = 1/sam_bet_rate[i];
if(mini>ratej[i] || mini==0) mini = ratej[i];
}
for(var i=0;i<ratej.length;i++){
ratej[i] = Math.round(ratej[i]/mini)
}
// ratej = [3, 2, 4, 3, 3, 2, 2, 3, 3, 4, 1, 3, 2, 3, 3, 4, 2, 1, 3, 1, 3, 2]
ratek=[]
ratek=ratej
for(k=1;k<rate.length;k++) ratek[k]=ratek[k-1]+ratej[k];
// ratek = [3, 5, 9, 12, 15, 17, 19, 22, 25, 29, 30, 33, 35, 38, 41, 45, 47, 48, 51, 52, 55, 57]
game_rate_rand=[];
for(j=i=0;i<rate.length;i++){
for(;j<ratek[i];j++) game_rate_rand[j]=i;
}
function get_random_rater_22(){
game_rate_rand = [0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 17, 18, 18, 18, 19, 20, 20, 20, 21, 21];
var r = parseInt(Math.random()*game_rate_rand.length);
return game_rate_rand[r];
}
//verify random by looping 700000 times
sum7=0;
for(i=0;i<rate7.length;i++){
sum7 += rate7[i];
}
avg7 = sum7 / 5; //4.6
rate = [4, 2, 2, 12, 4, 8, 6, 4, 2, 2,12, 4, 6, 2, 12, 4, 4,32, 2,12, 8, 2];
loopCount = 10000;
sum=0;
for(i=0;i<loopCount;i++){
r=get_random_rater_22()
rr=rate[r]
var r7 = parseInt(Math.random()*9);
if(r7==7) rr *= 4.6;
sum+=rr;
}
avg = parseInt(sum / loopCount / 8 * 10000)/100 + "%";
result:
// avg = 95.41%
// end verify random function