fix: adding more elements to the quantite attribute insofar as a piece can be used by multiple sets at many times.
This commit is contained in:
parent
0df3682d04
commit
7eb84a8d18
@ -316,15 +316,20 @@ def generate_table(nbElements : int, nameTable : str, funcGen) -> None:
|
||||
|
||||
def generate_table_using_quantite(nbElements : int, nameTable : str,
|
||||
funcGen) -> None:
|
||||
total : int = nbElements
|
||||
for i in range(nbElements):
|
||||
quantite : int = random.randint(0, int(total / 10)) if i < nbElements \
|
||||
else total
|
||||
total = total - quantite
|
||||
funcGen_2 = lambda : funcGen(
|
||||
str(quantite)
|
||||
)
|
||||
# total : int = nbElements
|
||||
# for i in range(nbElements):
|
||||
# quantite : int = random.randint(0, int(total / 10)) if i < nbElements \
|
||||
# else total
|
||||
# total = total - quantite
|
||||
# funcGen_2 = lambda : funcGen(
|
||||
# str(quantite)
|
||||
# )
|
||||
|
||||
# store_table(1, nameTable, funcGen_2)
|
||||
for i in range(nbElements):
|
||||
quantite : int = random.randint(0, nbElements)
|
||||
|
||||
funcGen_2 = lambda : funcGen( str(quantite) )
|
||||
store_table(1, nameTable, funcGen_2)
|
||||
|
||||
###############################################################################
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user