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

Merge branch 'window_closing'

parents 66a59a1d 4144bf0a
Branches
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)):
......
......@@ -60,7 +60,7 @@ class ControleurPhilosophersExample(Controleur):
self.addPoint(self.__barChart[2],0,i*50,y)
self.addPoint(self.__barChart[2],1,i*50,y-50)
def updateCycle(self, env, amas):
def updateWindow(self, env, amas):
agents = amas.get_Agents_Sorted()
for i in range(10):
......
from pyAmakIHM.classes.fenetre import Fenetre
from controleurPhilosophersExample import ControleurPhilosophersExample
from philosophersAmasExample import PhilosophersAmasExamples
from threading import Thread
fenetre = Fenetre("Prototype Philosophers")
amas = PhilosophersAmasExamples()
......@@ -9,14 +8,8 @@ amas = PhilosophersAmasExamples()
controleur = ControleurPhilosophersExample(fenetre, amas)
def run():
controleur.get_amas().start()
def main():
controleur.initialisation()
Thread(target=run).start()
controleur.get_fenetre().display()
controleur.start()
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment