WIP: Cas des espaces de taille constante: string.

This commit is contained in:
Jean Sirmai 2021-12-21 15:13:15 +01:00
parent 5a52450ae1
commit 8a7f97f53a
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 11 additions and 11 deletions

Binary file not shown.

View File

@ -6,10 +6,10 @@ sites = int(model.testmodel.get_parameters().spaceparam.get_site_multiplicity())
nb_arrows = int(model.testmodel.get_states().get_space(0).get_nb_arrows())
print("\nspace size = ", size, " nb de sites par cellule = ", sites,
" nb total de flèches dans l'espace = ", nb_arrows)
print("\nspace size =", size, " nb de sites par cellule =", sites,
" nb total de flèches dans l'espace =", nb_arrows, end='\n')
print(' | ', end=' ')
view = ' | '
# TODO Contrôles de cohérence des données
# condition et arrow
@ -31,19 +31,19 @@ for n in range(0, size + 1):
):
arr = sp.get_arrow(a).get_weight()
if arr > 0:
print(str(arr), end=' ')
view += str(arr) + ' '
else:
print('.', end=' ')
view += '. '
print(' | ', end=' ')
print('\n ' + ' ' * sites * 2, end='')
view += ' | '
coord = ' ' * sites + ' '
for k in range(0, size + 1):
if k < 9:
print(k + 1, end=' ' + ' ' * sites * 2)
coord += str(k + 1) + ' ' + ' ' * sites * 2
else:
print(k + 1, end=' ' + ' ' * sites * 2)
coord += str(k + 1) + ' ' + ' ' * sites * 2
print('\n', end="")
print(view)
print(coord)