diff --git a/philosopher_example/controleurPhilosophersExample.py b/philosopher_example/controleurPhilosophersExample.py index cdb4dc55753a83e15a4872dd25df344e7b5fcafa..52b271af63e09c21c2dd49dabe57afebcfb914b9 100644 --- a/philosopher_example/controleurPhilosophersExample.py +++ b/philosopher_example/controleurPhilosophersExample.py @@ -1,7 +1,7 @@ from pyAmakIHM.classes.controleur import Controleur from state import State from math import cos, sin, pi - +from random import randint class ControleurPhilosophersExample(Controleur): @@ -56,12 +56,12 @@ class ControleurPhilosophersExample(Controleur): nom = 'Mr ' + str(i) self.addColumn(self.__barChart[0],nom) - self.addPoint(self.__barChart[1],0,x-10,y-10) - self.addPoint(self.__barChart[2],0,i*50,y) - self.addPoint(self.__barChart[2],1,i*50,y-50) def updateWindow(self, env, amas): agents = amas.get_Agents_Sorted() + self.addPoint(self.__barChart[1],0,amas.get_cycle(),randint(0,100)) + self.addPoint(self.__barChart[2],0,amas.get_cycle(),randint(0,100)) + self.addPoint(self.__barChart[2],1,amas.get_cycle(),randint(0,100)) for i in range(10): state = agents[i].get_state()