Skip to content

Commit

Permalink
Update Ball.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushh0406 authored Feb 15, 2025
1 parent cd813a5 commit 704cdbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PingPong/Ball.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def drawBall(self):
def doHorizontalFlip(self):

self.vel[0] *= -1
print("Github")


def doVerticalFlip(self):
Expand Down Expand Up @@ -55,4 +56,4 @@ def checkSlabCollision(self, slabPos): # slab pos = [xmin, ymin, xmax, ymax]
if self.pos[0] < slabPos[0] or self.pos[0] > slabPos[2]:
self.vel[0] *= -1
if self.pos[1] < slabPos[1] or self.pos[1] > slabPos[3]:
self.vel[1] *= -1
self.vel[1] *= -1

0 comments on commit 704cdbd

Please sign in to comment.