Commit "Bug" Arthur Boivert

This commit is contained in:
Paul-Corbalan 2020-04-03 13:50:17 +02:00
parent 2716b3bc1f
commit 4e7032bd12
1 changed files with 46 additions and 41 deletions

View File

@ -157,6 +157,7 @@ def majPotentielsCroissance(pixelsCroissance, potentielsCroissance, nbPart):
potentielsCroissance[c] = potentielsBitmap[pixelsCroissance[c][0]][pixelsCroissance[c][1]]
def main(pixelsBitmap, pixelsCroissance, potentielsCroissance, nbPart):
try:
run = True
init()
# graine: début de décharge en haut au milieu
@ -202,6 +203,10 @@ def main(pixelsBitmap, pixelsCroissance, potentielsCroissance, nbPart):
nbPart += 1
if nouv[0] == 0 or nouv[0] == N-1 or nouv[1] == N-2 or nbPart > partMax :
run = False
print("N=", N, "eta=", eta, "nbpart=", nbPart, "MAXDELTA=", MAXDELTA)
return nbPart
except IndexError:
print("Bug")
print("N=", N, "eta=", eta, "nbpart=", nbPart, "MAXDELTA=", MAXDELTA)
return nbPart