|
@ -4,8 +4,12 @@ import java.awt.*; |
|
|
|
|
|
|
|
|
public class Ball extends Rectangle { |
|
|
public class Ball extends Rectangle { |
|
|
int xVelocity; |
|
|
int xVelocity; |
|
|
|
|
|
int yVelocity; |
|
|
public void setXDirection (int randomXDirection){ |
|
|
public void setXDirection (int randomXDirection){ |
|
|
xVelocity = randomXDirection; |
|
|
xVelocity = randomXDirection; |
|
|
} |
|
|
} |
|
|
|
|
|
public void setYDirection (int randomYDirection){ |
|
|
|
|
|
yVelocity = randomYDirection; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |