Python: Traffic-Simulation (cars on a road)

Posted by kame on Stack Overflow See other posts from Stack Overflow or by kame
Published on 2010-04-27T10:29:21Z Indexed on 2010/04/27 10:53 UTC
Read the original article Hit count: 306

Hello!

I want to create a traffic simulator like here: http://www.doobybrain.com/wp-content/uploads/2008/03/traffic-simulation.gif But I didn't thougt very deep about this.

I would create the class car. Every car has his own color, position and so on.

And I could create the road with an array.

But how to tell the car where to go? Could I hear your ideas?

EDIT: Is it forbidden to get new ideas from good programmers? Why do some people want to close this thread? Or were to ask such questions? I dont understand them. :(

© Stack Overflow or respective owner

Related posts about python

Related posts about simulation