def act(input)
@x -= 8 if input.left
@x += 8 + x(input) if input.right
@x = 0 if @x < 0
@x = SCREEN_W-@image.w if @x >= SCREEN_W-@image.w


end
def render(screen)
screen.put(@image, @x, @y)
end
end

def x(input)
if input.b
vx += 1
end
end

>>162 >>163ありがとう!
始めたばかりで手探り状態なんだが、
こんな感じかな?
上手く起動できない、見てくれ。