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:
damien DELPY 2024-11-26 17:46:54 +01:00
parent 0df3682d04
commit 7eb84a8d18
No known key found for this signature in database
2 changed files with 4635 additions and 4641 deletions

View File

@ -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