package cn.tedu.day07;
import java.awt.Color;
import java.awt.Graphics;
public class Ball {
int x,y;
int d;
Color ballcolor;
int speed;
int position;
public static final int LEFT_UP=0;
public static final int RIGHT_UP=1;
public static final int LEFT_DOWN=2;
public static final int RIGHT_DOWN=3;
private static final int SCREEN_HEIGHT =550;
private static final int SCREEN_WIDTH = 750;
public Ball(int x,int y,int position,int speed,int d,Color ballcolor){
this.x=x;
this.y=y;
this.d=d;
this.ballcolor=ballcolor;
this.speed=speed;
this.position=position;
}
public void drawBall(Graphics g){
g.setColor(ballcolor);
g.fillOval(x, y, d, d);
}
public void ballMove() {
```