degagé matplotlib
This commit is contained in:
parent
631dac180f
commit
76daf3f452
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user