adaptar código para uso de classe Mapa

This commit is contained in:
2024-09-10 11:04:41 +01:00
parent a3f5c41c7c
commit b4cfceca8c

View File

@ -1,22 +1,10 @@
from modules.agente import Agente
import modules.gui as Gui
from modules.mapa import Mapa
tamanho_mundo: tuple = (24, 24)
tamanho_mundo: tuple = (30, 30)
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:2} ', end='')
print('')
mapa = Mapa(tamanho_mundo)
mapa.mostrar()
Gui.App()