This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Source code: accelerating_cars

Built with Processing

I have demonstrated keyboard input and text output in this work
Press up and down to change the amount of acceleration
Press left and right to change the amount of deacceleration, press z and x to change the max speed, left click to apply gas or brakes
The car turns green when applying gas, red when braking, orange when stopped and yellow when reached max speed
While I was programming, I found it quite annoying that floating point numbers won't accept excatly 0.05 but only the reciapal of 2 to the power of x.
25/10/09