inicializar e popular mundo
This commit is contained in:
@ -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('')
|
||||||
|
|||||||
Reference in New Issue
Block a user