adaptar código para uso de classe Mapa
This commit is contained in:
@ -1,22 +1,10 @@
|
|||||||
from modules.agente import Agente
|
from modules.agente import Agente
|
||||||
import modules.gui as Gui
|
import modules.gui as Gui
|
||||||
|
from modules.mapa import Mapa
|
||||||
|
|
||||||
tamanho_mundo: tuple = (24, 24)
|
tamanho_mundo: tuple = (30, 30)
|
||||||
|
|
||||||
mundo: list = []
|
mapa = Mapa(tamanho_mundo)
|
||||||
|
mapa.mostrar()
|
||||||
# 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('')
|
|
||||||
|
|
||||||
Gui.App()
|
Gui.App()
|
||||||
|
|||||||
Reference in New Issue
Block a user