~kivy-team/kivy/master

« back to all changes in this revision

Viewing changes to examples/tutorials/pong/steps/step5/main.py

  • Committer: GitHub
  • Author(s): dessant
  • Date: 2016-12-14 17:50:19 UTC
  • mfrom: (3773.4.12)
  • Revision ID: git-v1:cc9c5f91b3adf70be9b92c2013ed330e9aec4d63
Merge pull request #4795 from kivy/pep8_fixes

[WIP] Pep8 fixes of the current master

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    def update(self, dt):
40
40
        self.ball.move()
41
41
 
42
 
        #bounce of paddles
 
42
        # bounce of paddles
43
43
        self.player1.bounce_ball(self.ball)
44
44
        self.player2.bounce_ball(self.ball)
45
45
 
46
 
        #bounce ball off bottom or top
 
46
        # bounce ball off bottom or top
47
47
        if (self.ball.y < self.y) or (self.ball.top > self.top):
48
48
            self.ball.velocity_y *= -1
49
49
 
50
 
        #went of to a side to score point?
 
50
        # went of to a side to score point?
51
51
        if self.ball.x < self.x:
52
52
            self.player2.score += 1
53
53
            self.serve_ball(vel=(4, 0))