Skip to content
Snippets Groups Projects
Commit a4d74a81 authored by shinedday's avatar shinedday
Browse files

Merge branch 'master' of https://gitlab.com/be-pyamak/example

parents 6ff21a5e 1c87e741
No related branches found
No related tags found
No related merge requests found
from pyAmakIHM.classes.controleur import Controleur from pyAmakIHM.classes.controleur import Controleur
from state import State from state import State
from math import cos, sin, pi from math import cos, sin, pi
from random import randint
class ControleurPhilosophersExample(Controleur): class ControleurPhilosophersExample(Controleur):
...@@ -56,12 +56,12 @@ class ControleurPhilosophersExample(Controleur): ...@@ -56,12 +56,12 @@ class ControleurPhilosophersExample(Controleur):
nom = 'Mr ' + str(i) nom = 'Mr ' + str(i)
self.addColumn(self.__barChart[0],nom) 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): def updateWindow(self, env, amas):
agents = amas.get_Agents_Sorted() 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): for i in range(10):
state = agents[i].get_state() state = agents[i].get_state()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment