Skip to content

Commit

Permalink
Lowered the velocity AI jumps at
Browse files Browse the repository at this point in the history
  • Loading branch information
austinhallock committed Mar 18, 2012
1 parent 0cb53c6 commit cdae16b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/scenes/slime_volleyball.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SlimeVolleyball extends Scene

moveCPU: -> # implement a basic AI
if @ball.x > @pole.x && @ball.y < 200 && @ball.y > 150 && @p2.velocity.y == 0
@p2.velocity.y = -12
@p2.velocity.y = -8
if @ball.x > @pole.x - @p1.width && @ball.x < @p2.x
@p2.x -= (Constants.MOVEMENT_SPEED*.75) + (Constants.MOVEMENT_SPEED*Constants.AI_DIFFICULTY)
if @ball.x > @pole.x - @p1.width && @ball.x + @ball.width + (@ball.velocity.x * Constants.AI_DIFFICULTY) > @p2.x + @p2.width && @ball.x + @ball.width < @width
Expand Down

0 comments on commit cdae16b

Please sign in to comment.