mirror of https://github.com/kivy/kivy.git
typo fix of -> off in pong source code
This commit is contained in:
parent
2cda9cef92
commit
9b8b29d90e
|
@ -42,7 +42,7 @@ class PongGame(Widget):
|
||||||
def update(self, dt):
|
def update(self, dt):
|
||||||
self.ball.move()
|
self.ball.move()
|
||||||
|
|
||||||
#bounce of paddles
|
#bounce ball off paddles
|
||||||
self.player1.bounce_ball(self.ball)
|
self.player1.bounce_ball(self.ball)
|
||||||
self.player2.bounce_ball(self.ball)
|
self.player2.bounce_ball(self.ball)
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class PongGame(Widget):
|
||||||
if (self.ball.y < self.y) or (self.ball.top > self.top):
|
if (self.ball.y < self.y) or (self.ball.top > self.top):
|
||||||
self.ball.velocity_y *= -1
|
self.ball.velocity_y *= -1
|
||||||
|
|
||||||
#went of to a side to score point?
|
#went off a side to score point?
|
||||||
if self.ball.x < self.x:
|
if self.ball.x < self.x:
|
||||||
self.player2.score += 1
|
self.player2.score += 1
|
||||||
self.serve_ball(vel=(4, 0))
|
self.serve_ball(vel=(4, 0))
|
||||||
|
|
Loading…
Reference in New Issue