Skip to content

Commit

Permalink
I think now is the time when commit will be approved!
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenParadise committed Oct 6, 2023
1 parent ff5a483 commit fba6a5f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/core/basesyntax/AreaCalculator.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package core.basesyntax;

public interface AreaCalculator {
public abstract double calculateArea();
double calculateArea();
}
2 changes: 1 addition & 1 deletion src/main/java/core/basesyntax/Drawable.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package core.basesyntax;

public interface Drawable {
public abstract void draw();
void draw();
}
4 changes: 2 additions & 2 deletions src/main/java/core/basesyntax/FigureSupplier.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
public class FigureSupplier {
private static final int FIGURE_TYPE_BOUND = 5;
private final Random random = new Random();
private final String randomColor = new ColorSupplier().getRandomColor();
private final int randomFigure = random.nextInt(FIGURE_TYPE_BOUND);

public Figure getRandomFigure() {
String randomColor = new ColorSupplier().getRandomColor();
int randomFigure = random.nextInt(FIGURE_TYPE_BOUND);
switch (randomFigure) {
case 0:
return new Square(randomColor, random.nextInt(10));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/core/basesyntax/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public static void main(String[] args) {
Figure[] figureArray = new Figure[6];
FigureSupplier figureSupplier = new FigureSupplier();
for (int i = 0; i < figureArray.length; i++) {
if (i < 3) {
if (i < figureArray.length/2) {
figureArray[i] = figureSupplier.getRandomFigure();
} else {
figureArray[i] = figureSupplier.getDefaultFigure();
Expand Down

0 comments on commit fba6a5f

Please sign in to comment.