Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9591cb8

Browse files
committed
minor cleanup in pipong example (0 + value)
1 parent a79053c commit 9591cb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/event_handling/pipong.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ def update(self, pads):
7979
self.vx *= 1.2 * pad.signx
8080
self.vy *= 1.2 * pad.signy
8181
fudge = .001
82-
# probably cleaner with something like...if not self.field.contains(self.x, self.y):
83-
if self.x < 0 + fudge:
82+
# probably cleaner with something like...
83+
#if not self.field.contains(self.x, self.y):
84+
if self.x < fudge:
8485
#print("player A loses")
8586
pads[1].score += 1
8687
self._reset(pads[0])

0 commit comments

Comments
 (0)