From 7125e579427ade65996677528cdf31fbd650bb82 Mon Sep 17 00:00:00 2001 From: Jdrezen <jeremie.drezen@gmail.com> Date: Wed, 12 May 2021 12:53:14 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20m=C3=A9thode=20updateWindow=20q?= =?UTF-8?q?ui=20est=20encapsul=C3=A9=20dans=20updateCycle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- philosopher_example/controleurPhilosophersExample.py | 2 +- philosopher_example/philosophersAmasExample.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/philosopher_example/controleurPhilosophersExample.py b/philosopher_example/controleurPhilosophersExample.py index 016961c..b9e4373 100644 --- a/philosopher_example/controleurPhilosophersExample.py +++ b/philosopher_example/controleurPhilosophersExample.py @@ -47,7 +47,7 @@ class ControleurPhilosophersExample(Controleur): self.addColumn(self.__barChart[1],nom) self.addColumn(self.__barChart[2],nom) - def updateCycle(self, env, amas): + def updateWindow(self, env, amas): agents = amas.get_Agents_Sorted() for i in range(10): diff --git a/philosopher_example/philosophersAmasExample.py b/philosopher_example/philosophersAmasExample.py index 513b8e3..83fee56 100644 --- a/philosopher_example/philosophersAmasExample.py +++ b/philosopher_example/philosophersAmasExample.py @@ -35,7 +35,4 @@ class PhilosophersAmasExamples(Amas): self.__observer = observer def on_cycle_end(self): - try: - self.__observer.updateCycle(self.get_environment(), self) - except: - print('trql trql') + self.__observer.updateCycle(self.get_environment(), self) -- GitLab