A pong clone, but with a twist!
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- function reversegame(dt)
- player1.height = ballSpeed/2
- player2.height = ballSpeed/2
- if (player1.y < ball[1].y)then
- player1.y = player1.y + ballSpeed/50
- elseif(player1.y > ball[1].y)then
- player1.y = player1.y - ballSpeed/50
- end
- if (player2.y < ball[1].y) then
- player2.y = player2.y + ballSpeed/50
-
- elseif(player2.y > ball[1].y) then
- player2.y = player2.y - ballSpeed/50
- end
- end
|