From 229a5e725f3f36a3d1223669432928520f160597 Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Tue, 7 Feb 2023 21:48:21 +0100 Subject: [PATCH] update --- src/main/java/PingPong/Ball.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/PingPong/Ball.java b/src/main/java/PingPong/Ball.java index 489760e..8c17da9 100644 --- a/src/main/java/PingPong/Ball.java +++ b/src/main/java/PingPong/Ball.java @@ -4,8 +4,12 @@ import java.awt.*; public class Ball extends Rectangle { int xVelocity; +int yVelocity; public void setXDirection (int randomXDirection){ xVelocity = randomXDirection; } + public void setYDirection (int randomYDirection){ + yVelocity = randomYDirection; + } }