D
D
deepin2019-07-28 05:44:29
PHP
deepin, 2019-07-28 05:44:29

How to judge such chances?

introductory: 2 opponents, the trophy to hack the vault worked for one, the trophy to protect the vault from hacking worked for the second, both trophies were pumped the same way, for example, by 20% and worked for both according to the condition (approximately) in order to judge them, then the numbers dropped in mt_rand() are compared, whoever has more wins the question: how to judge opponents if the numbers dropped in mt_rand() are equal? is it possible to substantiate this mathematically somehow, because you need to do something so that one of the opponents wins :)
if (mt_rand(1, 100) <= 20) // ok

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
prostoprofan, 2019-07-28
@deepin

Well, if they are both equal in odds, do rand(0,1) between them. I don't see any difficulty in this.

S
Serezha, 2019-07-28
Ahen @Ahen

Well, as in stone paper scissors - we try until the results are different.

D
Dmitry Derepko, 2019-07-28
@xEpozZ

If the numbers are equal, refer to the comparison on another property.
For example, on the character's luck percentage

T
tutuborg, 2019-07-28
@tutuborg

question: how to judge opponents if the numbers dropped in mt_rand() are equal?

Repeat just rand

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question