degagé matplotlib

This commit is contained in:
leo 2022-02-08 09:08:38 +01:00
parent 631dac180f
commit 76daf3f452
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB

View File

@ -1,6 +1,5 @@
import sumolib
from Car import Car
from matplotlib import cm
class CarController:
def __init__(self,path,parentMap,surface):
@ -18,8 +17,6 @@ class CarController:
car.update(1.0/60)
def draw(self,screen):
cmap = cm.get_cmap('Spectral')
for ind,car in enumerate(self.cars):
color=cmap(ind/len(self.cars))
car.draw([a*255 for a in color[0:3]])
for car in self.cars:
car.draw((255,255,255))
screen.blit(self.surf,(0,0))