redefinir metodo __str__() para mostrar info sobre objectos
This commit is contained in:
@ -10,8 +10,9 @@ mapa.mostrar()
|
||||
|
||||
# Gui.App()
|
||||
|
||||
print(mapa)
|
||||
pos_y = random.randint(0, tamanho_mundo[0])
|
||||
pos_x = random.randint(0, tamanho_mundo[1])
|
||||
obj_agente: Agente | None = mapa.posicao((pos_y, pos_x))
|
||||
if obj_agente is not None:
|
||||
obj_agente.mostrar()
|
||||
print(obj_agente)
|
||||
|
||||
Reference in New Issue
Block a user