diff --git a/game_theory_of_life.py b/game_theory_of_life.py index c24d964..eae0542 100644 --- a/game_theory_of_life.py +++ b/game_theory_of_life.py @@ -2,17 +2,21 @@ import random from modules.agente import Agente import modules.gui as Gui from modules.mapa import Mapa +import modules.estrategia as ModEstrategia tamanho_mundo: tuple[int, int] = (30, 30) +ModEstrategia.carregarFicheirosEstrategias('strategies/') + mapa = Mapa(tamanho_mundo, aleatorio=True) mapa.mostrar() # Gui.App() print(mapa) -pos_y = random.randint(0, tamanho_mundo[0]) -pos_x = random.randint(0, tamanho_mundo[1]) +pos_y = random.randint(0, tamanho_mundo[0]-1) +pos_x = random.randint(0, tamanho_mundo[1]-1) +print(f'{pos_y=} {pos_x=}') obj_agente: Agente | None = mapa.posicao((pos_y, pos_x)) if obj_agente is not None: print(obj_agente)