samples/learning_processing/chapter_08/02_two_car_objects.rb
def move(speed)
    @xpos += speed
    @xpos = 0 if @xpos > @app.width + LENGTH/2
    @xpos = @app.width if @xpos < -LENGTH/2
  end
# Define a class below the rest of the program.
Define a class below the rest of the program.
Define a class below the rest of the program .
def move(speed)
    @xpos += speed
    @xpos = 0 if @xpos > @app.width + LENGTH/2
    @xpos = @app.width if @xpos < -LENGTH/2
  end
def move ( speed ) @xpos += speed @xpos = 0 if @xpos > @app . width + LENGTH / 2 @xpos = @app . width if @xpos < - LENGTH / 2 end
Define a class below the rest of the program.
Define a class below the rest of the program .
speed