Does car.moved:=false tell the rest of the game that the car is out of gas?

If so, your car will stop on the first run through this procedure because the for loop will execute and set car.moved to false on the last run through its loop.

How many cars are there?

I would put the cars gas level in the car object. And then in your 'remainingGas' routine do something like this...

[pascal]
car.moved:=(car.gas>0);
[/pascal]

Assuming as well that you want to decrease the fuel, in that routine, then this is more appropriate:-

[pascal]
car.gas:=car.gas-1;
car.moved:=(car.gas>0);
[/pascal]

Unfortunately its a bit difficult without seeing all the code to comment any further. But even that second block of code is likely to result in early termination as it would take less than 2 seconds to use 100 units of gas (assuming a timer frequency equivalent to 60fps).

To get around that you can either use real numbers and subtract a fraction every cycle or you can use integers and give the car say 1000 units of gas and only subtract 1.

Hope this helps... if not, then I could do with seeing more of the code.