Quote:
Originally Posted by Corund
попробую объяснить алгоритм так:
x:=rand(100);
if x < P1 then summon
else if x < P1+P2 then summon
else if x < P1+P2+P3 then summon
else if x < P1+P2+P3+P4 then summon
ну и так далее
|
А как в конце? =)
Ситуация такая (речь о additional_make_multi_list): P1=30, P2=50 (в сумме не 100%).
Первый вариант:
Code:
x:=rand(100);
if x < P1 then summon(I1) else if x<P1+P2 then summon(I2) else exit;
Второй вариант:
Code:
x:=rand(100);
if x < P1 then summon(I1) else summon(I2);