Skip to content
Snippets Groups Projects
Commit dcedd228 authored by Jdrezen's avatar Jdrezen
Browse files

Modification des exemples pour fermer la fenetre de manière propre

parent 7125e579
No related branches found
No related tags found
No related merge requests found
......@@ -19,14 +19,7 @@ amas = AntHillExample(env)
controleur = ControleurAntsExample(fenetre, amas)
def run():
controleur.get_amas().start()
def main():
controleur.initialisation()
Thread(target=run).start()
controleur.get_fenetre().display()
controleur.start()
main()
......@@ -17,7 +17,7 @@ class ControleurAntsExample(Controleur):
for i in range(self.__numberAnts):
self.__ants.append(self.draw_image(widthCanvas / 2, heightCanvas / 2, 'images/blackAnt.png'))
def updateCycle(self, env, amas):
def updateWindow(self, env, amas):
ants = amas.get_Agents_Sorted()
for i in range(len(ants)):
......
......@@ -19,14 +19,7 @@ amas = AntHillExample(env)
controleur = ControleurAntsExample(fenetre, amas)
def run():
controleur.get_amas().start()
def main():
controleur.initialisation()
Thread(target=run).start()
controleur.get_fenetre().display()
controleur.start()
main()
......@@ -17,7 +17,7 @@ class ControleurAntsExample(Controleur):
for i in range(self.__numberAnts):
self.__ants.append(self.draw_image(widthCanvas / 2, heightCanvas / 2, 'images/blackAnt.png'))
def updateCycle(self, env, amas):
def updateWindow(self, env, amas):
ants = amas.get_Agents_Sorted()
for i in range(len(ants)):
......
......@@ -19,14 +19,7 @@ amas = AntHillExample(env)
controleur = ControleurAntsExample(fenetre, amas)
def run():
controleur.get_amas().start()
def main():
controleur.initialisation()
Thread(target=run).start()
controleur.get_fenetre().display()
controleur.start()
main()
......@@ -17,7 +17,7 @@ class ControleurAntsExample(Controleur):
for i in range(self.__numberAnts):
self.__ants.append(self.draw_image(widthCanvas / 2, heightCanvas / 2, 'images/blackAnt.png'))
def updateCycle(self, env, amas):
def updateWindow(self, env, amas):
ants = amas.get_Agents_Sorted()
for i in range(len(ants)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment