-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAsteroides.java
53 lines (41 loc) · 1.04 KB
/
Asteroides.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import java.awt.*;
import java.util.Random;
public class Asteroides extends ObjetoMovil {
private int width, height,max=50,min=15;
private Random r;
public Asteroides (Color color, int posX, int posY) {
super(color,posX,posY);
width = r.nextInt(((max - min) + 1) + min);
height = r.nextInt(((max - min) + 1) + min);
}
public void paint(Graphics g){
g.setColor(color);
g.fillOval(posX,posY,width,height);
}
public void bOOOM(){
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public int getMax() {
return max;
}
public void setMax(int max) {
this.max = max;
}
public int getMin() {
return min;
}
public void setMin(int min) {
this.min = min;
}
}