33 lines
741 B
Java
33 lines
741 B
Java
package DifferenceOfWheels;
|
|
|
|
import java.util.Random;
|
|
import java.awt.*;
|
|
|
|
public class DrawningWheels implements IOrnaments{
|
|
int CountWeel;
|
|
private int count = 0;
|
|
Random rnd = new Random();
|
|
int ranOrnament = rnd.nextInt(0, 3);
|
|
|
|
@Override
|
|
public void SetCount(int n) {
|
|
for (EnumWheels count: EnumWheels.values()) {
|
|
if (count.get_number() == n) {
|
|
CountWeel = n;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public int get_count_weels () {
|
|
return CountWeel;
|
|
}
|
|
|
|
@Override
|
|
public void DrawOrnament (Graphics2D g,int x, int y){
|
|
g.setColor(Color.BLACK);
|
|
g.fillOval(x, y, 25, 25);
|
|
}
|
|
}
|