Class LongRoad
java.lang.Object
LongRoad
public class LongRoad
- extends Object
A Long Road for vehicles to drive on
Constructor Summary |
LongRoad()
Creates a new LongRoad object |
Method Summary |
void |
animate(int turns)
Runs the animation of driving the vehicles down the road for the number of turns (frames, ticks, etc). |
void |
redraw()
Redraws the canvas each frame of the animation (a convenience method) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HEIGHT
public static int HEIGHT
LENGTH
public static int LENGTH
LongRoad
public LongRoad()
- Creates a new LongRoad object
animate
public void animate(int turns)
- Runs the animation of driving the vehicles down the road for the number of turns (frames, ticks, etc).
- Parameters:
turns
- The number of ticks in the animation.
redraw
public void redraw()
- Redraws the canvas each frame of the animation (a convenience method)