Skip to content

Commit

Permalink
Done2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hot00Tea committed Jan 5, 2025
1 parent e315a1c commit 1ef82b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/core/basesyntax/ColorSupplier.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public class ColorSupplier {
public String getRandomColor() {
int index = new Random().nextInt(Colors.values().length);
Colors color = Colors.values()[index];
return String.valueOf(color);
return color.name();
}
}
2 changes: 2 additions & 0 deletions src/main/java/core/basesyntax/Lottery.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class Lottery {

private final Random random = new Random();

private final Ball ball = new Ball();

public int getRandomBall() {
System.out.println(colorSupplier.getRandomColor());
int number = random.nextInt(MAX_VALUE);
Expand Down

0 comments on commit 1ef82b0

Please sign in to comment.