That seems to be in the seed. it has randomly the 12 twice.
So give another seed, that doesnt have this problem (for example 12345)
and you are done. Otherwise you store the values and check them
for dublicates before assigning them.

set rng [new RNG]
$rng seed 12345
for {set i 0} {$i < 5} {incr i 1} {
  set node [$rng integer 21]
 puts "random integer $node"
random integer 7
random integer 11
random integer 2
random integer 3
random integer 16



Reply via email to