25.05.2010, 20:59
If i have lots of odds like, 2:1 and 3:1 and 6/1. How do i work out random like for what odd is infavour to win.
Thanks
Thanks
switch(random(3))
{
case 0:
{
/// do something here
}
case 1:
{
/// do something here
}
case 2:
/// do something here
}
}
switch(random(9))
{
case 0,1,2,3:
{
/// do something here
}
case 4,5,6:
{
/// do something here
}
case 7,8:
/// do something here
}
}
Originally Posted by Mr_Tom
If someone sorts this out. And you have posts above 300+ I will Give You Ј4.00 on Paypal.
|
Originally Posted by Mr_Tom
If someone sorts this out. And you have posts above 300+
|
b) Do not bump Some people apparently think they are important enough to bump their own topic after 10 minutes. You can bump topics when the last reply is at least 12 hours old, and it needs to have useful information about your problem. |
new HorseRand[4];
HorseRand[0] = random(3);
HorseRand[1] = random(7);
HorseRand[2] = random(5);
HorseRand[3] = random(10);
if(HorseRand[0] == 0) //Winnar lol
if(HorseRand[1] == 0) //Winnar lol
if(HorseRand[2] == 0) //Winnar lol
if(HorseRand[3] == 0) //Winnar lol
stock OddsToOne(Odds)
{
new Rand = random(Odds);
if(Odds == 1) return 1;
if(Rand == 0) return 1;
if(Rand != 0) return 0;
}