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

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