Determining odds.

I just have psudo code atm, as i havn't started working on this yet.

But lets just say:

Player A has an overall skill of 1.39
Player B has an overall skill of 1.12

playerAoverall + playerBoverall = total
( playerAoverall / total ) * 100 = odds1
( playerBoverall / total ) * 100 = odds2

//Not a comment, but this is where random number generator would be

randomNum (capped at 100)

if randomNum >= odds1, playerA wins
if randomNum <= odds1, playerB wins



Would this be correct?

Hmm.. i suppose you wouldn't even need odds2 calculated, but that dosn't sound right...
Last edited on
it would be appropriate to make it this way: if randomNum > odds1, playerB wins since odds1 is approximately 55 and the probability of getting numbers between 0 and 55 incl. is higher.

Aceix.
okay, thank you.
Is there a better way to do this other than using random number?
Also, lets say i generate 100 random numbers and use this same method.

Would the odds always come out to be 55% no matter what? Or is the output not (that much) dependent on the var "odds1"?
Topic archived. No new replies allowed.