games50 / pong

Atari's 1972 classic, implemented in Lua with LÖVE
843 stars 1.13k forks source link

Update Ball.lua #68

Open thihakyaw opened 3 years ago

thihakyaw commented 3 years ago

dx should be math.random(2) == 1 and -100 or 100 and dy should be self.dy = math.random(-50, 50)

otherwise ball will spread up and down instead of left and right.

Schmel924 commented 2 years ago

Also in pong-4 ballDX = math.random(2) == 1 and 100 or #-100 ballDY = math.random(-50, 50)

Kana9999 commented 2 years ago

dx should be

math.random(2) == 1 and -100 or 100 and dy should be self.dy = math.random(-50, 50) otherwise ball will spread up and down instead of left and right.

Hello I am Struggling with figuring out how to submit work please done So if you see this please help