This commit is contained in:
Klafyvel 2017-12-05 23:04:42 +01:00
parent 891dc6ae34
commit f99cd9fd4a

View file

@ -79,7 +79,7 @@ def genere3(regles, L0, n):
for j in L:
regle = regles.get(j, [(1,j)])
poids_total = sum(map(lambda x:x[0], regle))
tirage = rd.uniform(0,poids_total-1)
tirage = rd.uniform(0,poids_total)
k = 0
while tirage > 0:
tirage -= regle[k][0]