From 1c87e741986fd0e3c19abc433aaf1950f0c9b34d Mon Sep 17 00:00:00 2001 From: Jdrezen <jeremie.drezen@gmail.com> Date: Fri, 14 May 2021 14:05:41 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20points=20sur=20les=20courbes=20pen?= =?UTF-8?q?dant=20l'ex=C3=A9cution=20des=20philosophes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- philosopher_example/controleurPhilosophersExample.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/philosopher_example/controleurPhilosophersExample.py b/philosopher_example/controleurPhilosophersExample.py index cdb4dc5..52b271a 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() -- GitLab