diff --git a/philosopher_example/controleurPhilosophersExample.py b/philosopher_example/controleurPhilosophersExample.py index 2b8fbe1b74fbcbcc9a4f2dcfb476c67a6202f9d5..7e3326987ac11729bcba76a1d467affffae0f235 100644 --- a/philosopher_example/controleurPhilosophersExample.py +++ b/philosopher_example/controleurPhilosophersExample.py @@ -11,8 +11,8 @@ class ControleurPhilosophersExample(Controleur): self.__numberPhilosopher = 10 self.__barChart = [] self.__barChart.append(self.addBarChart('Eaten Pastas')) - self.__barChart.append(self.addBarChart('Hours of tkinking')) - self.__barChart.append(self.addBarChart('Hours of hunger')) + #self.__barChart.append(self.addBarChart('Hours of tkinking')) + #self.__barChart.append(self.addBarChart('Hours of hunger')) def initialisation(self): @@ -22,16 +22,16 @@ class ControleurPhilosophersExample(Controleur): # Init self.setTitle(self.__barChart[0],'Eaten Pastas') - self.setXLabel(self.__barChart[0],'Philosophers') - self.setYLabel(self.__barChart[0],'Number of eaten pastas') + #self.setXLabel(self.__barChart[0],'Philosophers') + #self.setYLabel(self.__barChart[0],'Number of eaten pastas') - self.setTitle(self.__barChart[1],'Hours of thinking') - self.setXLabel(self.__barChart[1],'Philosophers') - self.setYLabel(self.__barChart[1],'Hours') + #self.setTitle(self.__barChart[1],'Hours of thinking') + #self.setXLabel(self.__barChart[1],'Philosophers') + #self.setYLabel(self.__barChart[1],'Hours') - self.setTitle(self.__barChart[2],'Hours of hunger') - self.setXLabel(self.__barChart[2],'Philosophers') - self.setYLabel(self.__barChart[2],'Hours') + #self.setTitle(self.__barChart[2],'Hours of hunger') + #self.setXLabel(self.__barChart[2],'Philosophers') + #self.setYLabel(self.__barChart[2],'Hours') self.draw_text(40,15, "EATING") self.draw_text(40,45, "THINKING") @@ -51,9 +51,10 @@ class ControleurPhilosophersExample(Controleur): self.__philosophers.append(carre) nom = 'Mr ' + str(i) - self.addColumn(self.__barChart[0],nom) - self.addColumn(self.__barChart[1],nom) - self.addColumn(self.__barChart[2],nom) + self.addPoint(self.__barChart[0],x,y) + #self.addColumn(self.__barChart[0],nom) + #self.addColumn(self.__barChart[1],nom) + #self.addColumn(self.__barChart[2],nom) def updateCycle(self, env, amas): agents = amas.get_Agents_Sorted()