app/jobs/game_simulation_job.rb
# We could make the current movement of the paddle affect speed instead or in
# addition.
We could make the current movement of the paddle affect speed instead or in
addition.
We could make the current movement of the paddle affect speed instead or in addition .
def corner_bounce(dy, speed, paddle, paddle_dimensions, ball, ball_dimensions)
    dy += speed * magnitude(paddle, paddle_dimensions, ball, ball_dimensions)
    dy = 0.9 * speed if dy > 0.9 * speed
    dy = -0.9 * speed if dy < -0.9 * speed
    dy
  end
def corner_bounce ( dy , speed , paddle , paddle_dimensions , ball , ball_dimensions ) dy += speed * magnitude ( paddle , paddle_dimensions , ball , ball_dimensions ) dy = 0.9 * speed if dy > 0.9 * speed dy = - 0.9 * speed if dy < - 0.9 * speed dy end
We could make the current movement of the paddle affect speed instead or in
addition.
We could make the current movement of the paddle affect speed instead or in addition .
dy
<not_specific>
speed
<not_specific>
paddle
<not_specific>
paddle_dimensions
<not_specific>
ball
<not_specific>
ball_dimensions
<not_specific>