JSFiddle - React, Tailwind, and code Playground
by amarcrypto
HTML
<p style="line-height: 18px; font-size: 18px; font-family: times;">
<br>
<b>Smart Gambling Edge Balls Experiment Game Play:
<br>
<br>Enter Your Own Balls or Just Use the default 1 to 9 Selection<br><br></b>
JavaScript
<script>
var swincount=0,slosscount=0,losscount=0,wincount=0,msloss=0,mswin=0,number,choice;
var prediction1, prediction2,prediction3,prediction4,prediction5,prediction6,prediction7,prediction8,prediction9,betno,display;
number=prompt("Enter No. of Balls (1-9)");
betno=prompt("Enter No. of Bets");
display=prompt("Display Bets y or n");
choice=prompt("Enter your own ball(s) y or n");
prediction1=1;
prediction2=2;
prediction3=3;
prediction4=4;
prediction5=5;
prediction6=6;
prediction7=7;
prediction8=8;
prediction9=9;
if(number==9)
{
if(choice=="y")
{
prediction1=prompt("Ball 1");
prediction2=prompt("Ball 2");
prediction3=prompt("Ball 3");
prediction4=prompt("Ball 4");
prediction5=prompt("Ball 5");
prediction6=prompt("Ball 6");
prediction7=prompt("Ball 7");
prediction8=prompt("Ball 8");
prediction9=prompt("Ball 9");
}
for(var i=0;i<betno;i++) {
var s = Math.floor((Math.random() * (11)));
if (display=="y")
{
document.write("Ball No.");
document.write(s);
}
if(s == prediction1 || s==prediction2 || s==prediction3 || s==prediction4 || s==prediction5 || s==prediction6 || s==prediction7 || s==prediction8 || s==prediction9)
{
if (display=="y")
{
document.write(" Win Streak No. ");
}
swincount+=1;
if(swincount > mswin)
{
mswin = swincount;
}
wincount+=1;
slosscount=0;
if (display=="y")
{
document.write(swincount);
}
}
else
{
losscount+=1;
if (display=="y")
{
document.write(" Loss Streak No. ");
}
slosscount+=1;
swincount=0;
if(slosscount > msloss)
{
msloss = slosscount;
}
if (display=="y")
{
document.write(slosscount);
}
}
if (display=="y")
{
document.writeln("<br>");
document.writeln("<br>");
}
}
}
else if(number==8)
{
if(choice=="y")
{
prediction1=prompt("Ball 1");
prediction2=prompt("Ball 2");
prediction3=prompt("Ball 3");
prediction4=prompt("Ball 4");
prediction5=prompt("Ball...