inicializar e popular mundo

This commit is contained in:
2024-09-06 12:10:08 +01:00
parent e9ca903377
commit 644062b693

View File

@ -0,0 +1,19 @@
from agente import Agente
tamanho_mundo: tuple = (24, 24)
mundo: list = []
# inicializar mundo
for _ in range(0, tamanho_mundo[0]):
mundo_tmp: list = []
for _ in range(0, tamanho_mundo[1]):
mundo_tmp.append(Agente())
mundo.append(mundo_tmp)
# preencher mundo
m, n = 0, 0
for m in range(0, tamanho_mundo[0]):
for n in range(0, tamanho_mundo[1]):
print(f'{mundo[m][n].pontuacao} ', end='')
print('')