26
Mar
roulette
mathlost12 asked:


I’m looking for psdocode to understand . how would you create it so it would land on large numbers X percent of the time.

How to play poker
Category : Programming & Design

Comments

deonejuan March 28, 2009

Dealing with probability is a delight for some. It cracks my skull, but I can trial and error what I want. Since you are just “rolling dice” you can just use weighted factors.

float littleUns = 0.10f;
float middleUns = 0.30f; // 30% probability
float restUns = 0.60f; // complete the curve of 100% possibles

randomNo = new Random(1); // between 0 and 1

if ( randomNo < littleUns)
// either pick a new number between 1 to 10 or multiply
elseif( randomNo > littleUns && randomNo < middleUns)
// do like above
else
pick in the numbers between 40 and 50;

But don’t forget, Roulette is complex rules with 0 and 00 — House Wins and also Red/Black is low payout.

Leave a comment