Witam,
Mam problem ponieważ nie do końca wiem jak zmienić mój kod tak aby otrzymać upragniony rezultat. Chciałbym aby w każdej linii były wypisane liczby kolejno z game[0], game[1] i game[2] a póki co otrzymuje trzy razy wynik z game[0].
game = [[1, 2, 3],
[2, 4, 3],
[2, 5, 1]]
def drawBoard(size):
dashes = '---'
pipes = '|'
dashesSize = 3 * size + (size + 1)
for howMany in range(size):
print('{{:>{}}}' .format(dashesSize).format((dashes + ' ') * size), end='')
#print('\n')
iterator = 0
for line in game:
print('\n\n' + pipes, end=' ')
for number in line:
print(line[number-1], end=' ')
print(pipes, end=' ')
break
# =============================================================================
# for number in range(len(game)):
# print((pipes), end=' ')
# print(game[number], end=' ')
# =============================================================================
#print((pipes), end=' ')
print('\n')
print('{{:>{}}}' .format(dashesSize).format((dashes + ' ') * size), end=' ')
drawBoard(3)